Checking if a material is being used by somebody anybody
If you want to know whether a material is used by any objects in the scene, you can check the UsedBy property. Here’s a Python snippet that finds unused materials in the current material library: from...
View ArticleGetting a list of all shaders in a render tree
Here’s a Python snippet that gets all the shaders in the render tree for a specific material. As usual, I always feel that my Python snippet could be made more pythonic; for now, this will have to do…...
View ArticleGetting the DataArray2D for the Materials ICE attribute
Here’s the Python way: Application.SelectObj("Pedestrian_Mesh.Actor_Copies", None, None); o = Application.Selection(0) a = o.ActivePrimitive.Geometry.GetICEAttributeFromName("Materials") print...
View ArticleFinding materials used by a model
Here’s one way to get the materials used by model. Note that this will also get any materials applied to clusters. si=Application def get_mdl_materials( m ): from win32com.client import constants as c...
View Article