On 25/04/2017 at 02:49, xxxxxxxx wrote:
A seemingly simple task: trying to copy the color value from one material to another via a python tag. I'm able to access and copy most other attributes, but the color value, represented as a vector, is a little over my head.
If I look at the material's color value in the console via the print command, such as:
print material_1[c4d.MATERIAL_COLOR]
I get a return of: Vector(0.7,0.5,0.5)
I can manually assign these values to another material via the c4d.Vector() command, however I can't figure out the correct syntax to pass them to a variable or item via python.
While the [c4d.MATERIAL_COLOR] seems to hold the correct vector values, it's not recognized by python as a vector. I've been playing with the Vector__getitem__() command, but so far I've botched it.
any insight would be appreciated. (ps. I'm not a python guy, so if it gets too invloved, I can always do the ol' set driver/set driven expresso dance, but I'm trying to reduce my clicks.
thanks,
Mike