Thu, Jan 9, 5:29 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 Dec 02 3:16 pm)

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: Name that script.


PhilC ( ) posted Thu, 15 November 2012 at 12:19 PM · edited Thu, 09 January 2025 at 5:19 PM

import poser

def main():
    r = 25
    g = 25
    b = 25
    i = 0
    while i < 50:
        setDiffuse(r,g,b)
        r = r + 1
        g = g + 1
        b = b + 1
        i = i + 1

def setDiffuse(r,g,b)
    material = poser.Scene().CurrentMaterial()
    shaderTree = material.ShaderTree()
    poserSurface = shaderTree.Node(0)
    diffuseNode = poserSurface.InputByInternalName("Diffuse_Color")
    diffuseNode.SetColor(r,g,b)
    shaderTree.UpdatePreview()
    scene.DrawAll()    

main()


jonthecelt ( ) posted Thu, 15 November 2012 at 12:46 PM

Looks to me like it's a script that sets the diffuse colour to shift through... oh gods...

 

50 shades of grey.


RobynsVeil ( ) posted Thu, 15 November 2012 at 3:22 PM · edited Thu, 15 November 2012 at 3:22 PM

MakeMySceneMonochrome.py ??

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


Khai-J-Bach ( ) posted Thu, 15 November 2012 at 3:24 PM

Bob ?



PhilC ( ) posted Thu, 15 November 2012 at 3:37 PM

And the winner is ........ jonthecelt

We both really should get out more :)


jonthecelt ( ) posted Thu, 15 November 2012 at 3:45 PM

The saddest part is, I didn't realise EXACTLY what you were doing until I was actually typing it - I worked it through that there were fifty iterations of the script, and then my brain worked out that (25,25,25) was a grey colour - and that's when it hit me.


RobynsVeil ( ) posted Fri, 16 November 2012 at 1:28 AM

Oh, I actually thought this was something useful. Ooops. Like, one could render an entire scene in shades of grey.

Well done, jonTheCelt. 😄

Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2

Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand] 

Metaphor of Chooks


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.