On 05/12/2013 at 20:58, xxxxxxxx wrote:
Hi, I want to replace a certain shader within a material.
If I know where in the material I want the replacement to be done, no problem.
But I want to replace a certain shader type, doesn´t matter where it is.
So even if it´s a Bitmap in a Filter in the Color channel, I want it to be replaced.
With GetFirstShader and then a GetNext/Up/Down loop I find all the shaders.
But how can I insert that new one?
I mean manually for the Filter/Bitmap in Color, it would be:
material[c4d.MATERIAL_COLOR_SHADER][c4d.SLA_FILTER_TEXTURE] = NewShader
material.InsertShader(NewShader)
So how do I get this "path" into the new shader?