Notifications
Clear all

[Closed] Delete unused scene materials

Hi there.

What I’m searching for is, a function or method to delete all materials, considering assigned maps, which aren’t assigned to an object. This is, to clean up my scene, preserving just the used materials.

Someone around here any ideas?

3 Replies

My fault. Materials that aren’t assigned to any object are deleted from the scene after saving.

I just created a new scene – and 2 simple materials, saved as a file, reset and reopened and the materials are still saved.

I you can manually clear unassigned materials this by material editor > utilities > condense material editor slots.
NB. This is useful for clearing V-Ray and Brazil dll errors. The editor slots are reset to standard ( or whatever you are set to – mental ray for example. )

Yes, u can do that through condense material. but the sytem global sceneMaterials is not updating, there are always garbage instance of materials “floating” in the scene, u can’t access the material by ui, but they exists in ur scene, I have a function someone wrote to wipe out abundant materials, it just checks every object in the scene to see what material it used, and delete the others, but it’s on my working computer , i’ll have access to it next monday.

I don’t know if this way is correct, but it deletes something everytime i ran it