Forum: Poser Python Scripting


Subject: Name that script.

PhilC opened this issue on Nov 15, 2012 ยท 7 posts


PhilC posted Thu, 15 November 2012 at 12: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()