I got a scene with what seems like a thousand shaders in it. Multisubmats with materials inside, and I am just curious if there is a script that can count how many materials including submaterials are in the scene?
Announcement
Collapse
No announcement yet.
is there a script to count number of materials in the scene?
Collapse
X
-
is there a script to count number of materials in the scene?
Dmitry Vinnik
Silhouette Images Inc.
ShowReel:
https://www.youtube.com/watch?v=qxSJlvSwAhA
https://www.linkedin.com/in/dmitry-v...-identity-nameTags: None
-
This should give you a good estimate:
Code:unique_scene_materials = #() fn collectMaterials material_list = ( for m in material_list do ( if (classof m == Multimaterial) then collectMaterials m.materialList else appendIfUnique unique_scene_materials m ) ) collectMaterials sceneMaterials print (unique_scene_materials.count as string + " materials in the scene.")
Cheers
Comment