ScriptSpot

Forum topic · General Scripting

Counting unused materials

By kredka · 2014-01-02

Description

Is it way to count unused material in scene. By unused I mean materials which are not attached to any object on scene. I tried this:

for i = 1 to 24 where not MeditUtilities.isMaterialInUse meditMaterials[i] collect meditMaterials[i]

but it also include defoult grey materials from material editor but I have to count not attached materials(defined by user )
Is it possible?