papillon68 opened this issue on Nov 19, 2010 · 24 posts
papillon68 posted Fri, 19 November 2010 at 12:16 PM
I have the following code (taken and adapted from PhilC's Python for Poser book), that work fine when I try to change the Diffuse Color of a Material:
actor = (scene.Actor("hutRoofLP_19"))
mat = actor.Materials()[0]
# find the material's shader tree and its root
tree = mat.ShaderTree()
root = tree.Node(0)
# find the Diffuse_Color node.
diffCol = root.InputByInternalName("Diffuse_Color") # <<< OK
diffCol = root.InputByInternalName("Alternate_Diffuse") # <<< ERROR
diffCol.SetColor(1,0,0)
However, I need to change the Alternate_Diffuse value, and that gives the following error:
AttributeError: 'NoneType' object has no attribute 'SetColor'
Anybody knows how to correctly address the Alternate Diffuse ? Thanks
visit my
blog: www.alessandromastronardi.com
My
Rendo Store