Hi,
I am dynamically generating takes in Python and I need to override material (replace one material with another one) on specific object. I have found a script which allows you to override material color, but I have no clue how to override the whole material.. any ideas?
for i in xrange(10):
takeName = "Variation " + str(i)
materialVariation = takeData.AddTake(takeName, None, None)
if materialVariation is not None:
materialColorParameter = c4d.DescID(c4d.DescLevel(c4d.MATERIAL_COLOR_COLOR, c4d.DTYPE_COLOR, 0))
hsv = c4d.Vector(float(i) * 0.1, 1.0, 1.0)
rgb = c4d.utils.HSVToRGB(hsv)
overrideNode = materialVariation.FindOrAddOverrideParam(takeData, material,materialColorParameter, rgb)
if overrideNode is not None:
overrideNode.UpdateSceneNode(takeData, materialColorParameter )