So I'm just curious if there's an easy way to copy the color value from one node (technically the node's input) to another node using python. Basically I want to copy the Diffuse_Color value from the PoserSurfaceNode to the Color value on a PhysicalSurfaceNode
I can get the color value of Diffuse_Color using this:
where ffRoot is the PoserSurfaceNode. If I print the value of diffuseColorValue it looks like this:
But if I try to simply pass that value into my superfly node like this:
where sfRoot is my PhysicalSurfaceNode, I get the error:
Okay, so I get what's happening. The Value() is returning a tuple, and SetColor() wants three floats. And I do know how to take apart the tuple and pass in the float values one at a time, but I was just wondering if there is an easier way to do this. It seems like there should be, but I know Poser doesn't always have the python methods I think it should.
Figured it couldn't hurt to ask.
I can get the color value of Diffuse_Color using this:
Code:
diffuseColorValue = ffRoot.Input(0).Value()
(1.0, 1.0, 1.0)
But if I try to simply pass that value into my superfly node like this:
Code:
sfRoot.Input(0).SetColor(diffuseColorValue)
Error parsing SetColor()
Usage: SetColor(<FloatType> r, <FloatType> g, <FloatType> b)
Okay, so I get what's happening. The Value() is returning a tuple, and SetColor() wants three floats. And I do know how to take apart the tuple and pass in the float values one at a time, but I was just wondering if there is an easier way to do this. It seems like there should be, but I know Poser doesn't always have the python methods I think it should.
Figured it couldn't hurt to ask.