Remove unused materials?

  • Is there a script out there to remove unused materials?
    I have found that when composing a scene you often end up with a long list of materials that will not be used in the final render. Whether this has an effect on load time prior to render beginning or not I'm not certain.

    I know Carrara has an option to remove unused textures and something like this would be very handy in Poser.

  • remove detached nodes.

  • @ghostship

    Ah - I never checked to see if that option actually removes them from the drop down list in the material room or not - but that is still a long winded way of doing it as you have to go material zone by material zone. I was thinking more along the line of a script that looks at what is actually used and then deletes everything else.

    Will have a try when my latest render has finished.

  • Poser Ambassadors

    In the material room :

    Click => "Remove detached Nodes" to remove all unused nodes from a material zone.

    Click => Shift+"Remove Detached Nodes" to remove all unused nodes form an object. => All unused nodes from all material zones of that object file are removed.

  • That's a nice little tidbit Tony. I never knew you could remove them from all materials. ~smile~

  • This is what I was referring to:
    alt text
    each time you change a texture it keeps a record of it - so if you choose a hairstyle for example and then delete it and apply a new hairstyle, the references to the old one are still listed in the material room even though the old one is not in the scene.

    If one plays around and changes a few textures or hairstyles the list of references to the material files can get quite substantial.

  • @tastiger The only way I know to get rid of that is to save and reopen the scene.

  • @shvrdavid

    Thanks - I think you may be right - something for the Poser Devs to think about for a future version

  • I agree that there needs to be a way to purge those from the scene.

    I filed an enhancement request and added a link to your thread here.

  • @shvrdavid
    Many thanks for putting in the request - I would have thought that selecting "reload textures" should have done the job.

    Anyhow I saved and opened again a scene and yes that does clear the list.

  • @tastiger Thanks for reminding me it needed brought up again.