Fri, Nov 22, 6:47 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: script for turning off Mat-based GC?


Vex ( ) posted Mon, 09 August 2010 at 11:13 AM · edited Fri, 22 November 2024 at 2:15 PM

I would like to include a script in my packages that disable MAT-based GC ( set a specific value to 1 ).

Anyone know if there's one available to share ( with credit of course ) or help me figure out how to make one? 



Dizzi ( ) posted Mon, 09 August 2010 at 12:35 PM · edited Mon, 09 August 2010 at 12:35 PM

Could you please explain what you mean? Do you have a material what does GC and want to change the value of a node with a certain  name? Or do you want to disable GC (Poser Pro) for some texture names?



Vex ( ) posted Mon, 09 August 2010 at 1:04 PM

 Bagginsbill's VSS shader has built in GC. I would like to use that, but supply a script to turn it off ( set PM:Gamma node to 1 instead of 2.2 ) so that if you want to use the renderer GC instead of mat GC, you don't have to go around editing every mat zone with it, just 1 click done.



Dizzi ( ) posted Mon, 09 August 2010 at 2:01 PM

file_457333.txt

This would work for the current selected figure:
value=1.0
for mat in poser.Scene().CurrentFigure().Materials():
        shdrTree = mat.ShaderTree();
        if shdrTree!=None:
                for node in shdrTree.Nodes():
                        if node.Name()=="PM:Gamma":
                                node.Input(1).SetFloat(value)

The attached script allows to set the gamma for the current material, actor or all materials and to do it for maps that should not be corrected (Displacement, Bump...), too. It's for Poser Pro 2010 only, though.



Vex ( ) posted Mon, 09 August 2010 at 2:19 PM

 thats fantastic. thank you so much! =)



bagginsbill ( ) posted Mon, 09 August 2010 at 7:43 PM

Thanks dizzi. I'm under a deadline at work and have very little time for Poser stuff today.

Vex - it is possible to make the gamma value automatic.

Change the gamma node to a subtract, and add two more nodes.

Isaoshi wrote how here:

http://www.renderosity.com/mod/forumpro/showthread.php?message_id=3644388&ebot_calc_page#message_3644388

Since this handy idiom was revealed, I'm making all my shader GC automatically shut off when render GC is enabled.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Mon, 09 August 2010 at 7:45 PM

Note - looking down that thread, I see you were already there, proclaiming that you feel dumb.

grin


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.