Project filesize increase
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/05/2012 at 12:57, xxxxxxxx wrote:
Hello,
Hoping someone might know the reason for this problem which is affecting my C4D project.
I'm using a Python script to change the alpha value of a series of textures which are applied to objects in my scene. An ObjectList node iterates through the objects and once I have identified the material tag associated with the object I set its alpha.
It has all been working well but I've noticed things slowing down in my project file and just noticed that the file size is increasing for no obvious reason! I suspect that the materials which I'm updating are somehow storing the data they are being set with by my Python script. When I delete the materials the file size goes down substantially.
The snippet of code I'm using to change the material alpha is:
mat = tag.GetMaterial()
alphashader = c4d.BaseList2D(c4d.Xcolor)
alphashader[c4d.COLORSHADER_COLOR] = c4d.Vector(alphaValue) #assigning value of half transparence
mat[c4d.MATERIAL_ALPHA_SHADER] = alphashader #set the shader to the alpha channel
mat.InsertShader(alphashader)
#internal update of the material
mat.Update(True, True)
mat.Message(c4d.MSG_UPDATE)
c4d.EventAdd()Hope you can help!