On 13/02/2018 at 13:54, xxxxxxxx wrote:
Hi,
To insert a texture into the color channel , I applied the following lines of code with success:
full_name_file = pathToTexture + '/' + texture_file
shdr_texture = c4d.BaseList2D(c4d.Xbitmap)
shdr_texture[c4d.BITMAPSHADER_FILENAME] = full_name_file
mymat[c4d. MATERIAL_COLOR_SHADER ]= shdr_texture
mymat.InsertShader(shdr_texture)
mymat.Update(True, True)
Then,I tried to do the same thing to insert a texture in the transparency channel , with the following code:
full_name_file = pathToTexture + '/' + texture_file
shdr_texture = c4d.BaseList2D(c4d.Xbitmap)
shdr_texture[c4d.BITMAPSHADER_FILENAME] = full_name_file
mymat[c4d. MATERIAL_TRANSPARENCY_SHADER ]= shdr_texture
mymat.InsertShader(shdr_texture)
mymat.Update(True, True)
However, this code had no effect because the transparency channel isn't created by default.
Before the insertion of the texture, I think it is necessary to create the transparency channel for the material.
How to proceed with python ?