Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest soccerrprp

Removing all MISSING materials from the object manager at once?

Recommended Posts

Guest soccerrprp
  • Topic Author
  • Hi all,

    I don't know if this has been discussed, but have done some searching and not able to find what I want. Is there a way to delete ALL MATERIALS FROM THE OBJECT MANAGER THAT ARE MISSING? I have a project given to me by another that has 3 materials that are missing. These materials have been used on tons of objects in the object manager and it would take me some time to delete all of them from the object manager. Is there a way to have C4D delete all of the materials that now have X's through them indicating that these materials no longer exist?

    Thank you.

    Richard

    Share this post


    Link to post
    Share on other sites

    Try selecting those materials in the Materials Manager. Then in the Functions menu in that window, choose Select Texture Tags/Objects. Make your Object Manager window active and hit delete. This should delete the tags from your objects. Now in the Materials Manager you should now be able to hit Remove Unused Materials.

    Another thing you could do is after you Select Texture Tags, you'll notice in the Attributes window that it should tell you how many tags you have selected and right below the name of that material (or <<Multiple Values>>). You can now drag a new material icon from your Materials window and drop it in this Material field thus replacing all the bad/missing materials with a fresh one!

    I learned that trick when I had 10 car models and tons of crappy looking chrome materials but all with different names. I was able to use this process to replace them all with the same good chrome in short order.

    Hope this helps! :thumbsup:

    Share this post


    Link to post
    Share on other sites
    Guest soccerrprp
  • Topic Author
  • Thanks, BigAl, but my problem is a little different, I think.

    The material in question does not exist in the material manager, so I have all these material tags in the object manager with an X through them. Any way to delete all materials that no longer exist in the material manager? Can a script be created that detects whether a stray materisl is present and then deletes them from the object manager?

    Thanks.

    Share this post


    Link to post
    Share on other sites

    Oh, so you're saying the material is no longer in the material manager. I thought you were missing textures within existing materials.

    Now this is interesting. There has to be a way to do this... :thumbsup:

    Share this post


    Link to post
    Share on other sites

    Change the Object Manager display mode to "Flat" then also change to "Vertical Tags". You can then easily select the X tags and delete. Now run a "Remove unused materials" command in the MM.

    Hope this helps.

    3DKiwi

    Share this post


    Link to post
    Share on other sites
    Guest soccerrprp
  • Topic Author
  • That helps tons, Nigel! It shouldn't be difficult to create a simple plug that will do that for you, right?

    THANK YOU!

    Share this post


    Link to post
    Share on other sites

    See, having someone living on the other side of the world let's him see things from a different angle! Thanks. I'll add this one to my notes.

    Share this post


    Link to post
    Share on other sites

    Yeah, I'm standing upside down :thumbsup:

    3DKiwi

    Share this post


    Link to post
    Share on other sites

    Change the Object Manager display mode to "Flat" then also change to "Vertical Tags". You can then easily select the X tags and delete. Now run a "Remove unused materials" command in the MM.

    Hope this helps.

    3DKiwi

    But you still have to pick through the textures if there are ones that you want to keep, and that can be quite a task if you've got a complex scene. Though if they've been named you'll be in luck as you can sort by name and they'll all come together in the list.

    Cheers

    Karl

    Share this post


    Link to post
    Share on other sites

    Yeah but he's asking about deleting ones with missing materials. These show up as an X on the texture tag. They should all be grouped together.

    Different story if you want to pick and choose some and not the others. That would take a bit of work.

    3DKiwi

    Share this post


    Link to post
    Share on other sites

    But if nothing has been named and they're all called Texture they'll be all over the place. Well, at least I think that's how they come out. I'll have to check as I haven't done it that way for a while.

    Cheers

    Karl

    EDIT: Just checked and I remembered it a little wrong. What happens is everything gets called Texture and the missing mats are all over the place so you'd still have to go through and select the missing ones.

    Share this post


    Link to post
    Share on other sites

    That helps tons, Nigel! It shouldn't be difficult to create a simple plug that will do that for you, right?

    This doesn't need a plugin, a simple script will do. The attached file when unzipped should be copied into the folder library/scripts in your C4D installation. When you restart C4D, it will be found in the Script Manager. Just run the script and it will delete all texture tags with no material (those with the white X in the tag). It will tell you how many it deleted but you won't see them disappear from the object manager until you close the message box.

    Hope this helps. Let me know if there are any problems.

    RemoveDeadMats.zip

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    • Recently Browsing   0 members

      No registered users viewing this page.

    Latest Topics

    Latest Comments

    ×
    ×
    • Create New...