Transparency channel - Color update
-
Hi,
In the 'Transparency' channel of a material, I need to modify the color.
How to read and modify this value with Python ?
I already have the material identifier. -
You can simply edit the
MATERIAL_TRANSPARENCY_COLOR
parameter.Mat[c4d.MATERIAL_TRANSPARENCY_COLOR]
The parameter stores a c4d.Vector.
You find examples on how to handle materials on GitHub.
-
I found the solution (I already had this problem but I couldn't remember the right code)
mat [c4d.MATERIAL_TRANSPARENCY_COLOR] = c4d.Vector (1.0, 1.0, 1.0) #color white
mat.Update (True, True)