Deleting materials when deleting a figure as well? [Solved]
DrGonzo62
Posts: 393
Hi,
How can I delete all the materials for a character once imported into Blender when I no longer need that figure?
In DAZ when you delete a figure all references are gone as well.
When I delete an imported character in Blender, all its materials and images stay behind when using Clean Up, even when I used "Select Hierarchy" before deleting it.
Is the a way to do the same thing in Blender? Deleting a character along with all materials and images used?
Actually deleting the entire hierarchy and not just the meshes?
I know how to delete materials in Blender, but how do I know which ones are no longer used and which ones still are?
Adding Fake User to the materials of a figure that I'd like to keep can be pretty tedious for something more complex.
Thanks!

Comments
Yes this is annoying. Blender has the strange habit to keep in memory deleted content until you save and reopen as a new scene. Never understood why. However it is easy to get rid of unused data.
file > cleanup > purge unused data
p.s. However, being Blender an animation software, usually we link figures together with the rig, rather than importing multiple figures in the scene. I mean the import process from DAZ is usually targeted at a single figure to be saved in its own file.
Hi Padone,
I have been using Purge Unused Data, but materials and their associated textures are not being deleted by this process, even if they don't have a Fake User tag.
So you're saying that saving and reopening the scene will get rid of those unused materials?
Thanks, as always.
OK, I tried it again with a simple 2 figure scene and this time it did delete all materials and textures for the figure I deleted.
For more complex scenes with multiple figures this doesn't always seem to work. Oh well...
Thanks Padone.
If it doesn't work then it means the resource is used somewhere, you can verify the number of users, it must be zero for the resource to be disposable. For example one image could be shared among multiple textures so deleting one doesn't make the image disposable. Unless there's some bug in blender.