Forum: Poser Python Scripting


Subject: How to update a Clouds node Gain value?

VedaDalsette opened this issue on Jan 11, 2023 ยท 4 posts


VedaDalsette posted Wed, 11 January 2023 at 2:37 PM

adp001 posted at 1:34 PM Wed, 11 January 2023 - #4453662

scene = poser.Scene()
for actor in [a for a in scene.Actors() if a.Name().startswith("Building")]: # type: poser.ActorType
for tree in [m.ShaderTree() for m in actor.Materials() if m.Name().startswith("Concret")]: # type: poser.ShaderTreeType
for node in [n for n in tree.Nodes() if n.Type() == poser.kNodeTypeCodeCLOUDS]: # type: poser.ShaderNodeType
node.InputByInternalName("Gain").SetFloat(0.75)
print("Done.")

adp001, thanks so much! I NEVER would have gotten this. Much appreciated. I'm so excited. Now, I can other values in this scene!

on Edit: BTW, it worked like a charm and in the blink of an eye!



W11,Intel i9-14900KF @ 3.20GHz, 64.0 GB RAM, 64-bit, GeForce GTX 4070 Ti SUPER, 16GB. 

Old lady hobbyist.

All visual art or fiction is "playing with dolls."