Materials Management

Hi. I’m having an absolutely wonderful time with Rhino and Bongo, working on my project.

So, I apologize if this a stupid thing to ask about, but I keep having issues with “ghost” Materials in my Rhino projects, and I would like a better way to manage Materials in general. If anybody has advice on either of these issues, it would be appreciated!

  1. “Ghost” Materials associated with Blocks. Basically, it’s like this: I’m building things that use Blocks to use with Bongo. Some of these things get imported into other Rhino scenes. When they’re imported, they bring their Materials with them. But, after the contents of the Blocks are deleted, the Materials say they’re still “being used”.

I’ve just now figured out that the Blocks are still present in Block Manager, despite the geometry being zapped, so the Materials are still recorded as “being used”.

Deleting these Blocks freed up (but did not delete) their Materials, which leads into the second thing:

  1. Materials deletion of unused Materials is kind of painful.

Ideal workflow: open Materials window, right-click, select “Show Only Unused”, CTRL-A, DELETE.

That doesn’t work, however, because when you CTRL-A, or shift-click, you’re actually selecting all of the used Materials, too; they’re just not being shown. If you use DELETE and pick “yes”, you’ve just zapped all of your Materials. Not ideal, lol!

So, instead, you need to “select unused”, then manually left-click on each one, hit DELETE, hit Y for “yes, I want to delete this”. It’s not a big deal for 1-2 Materials, but I’m having this issue with 20+ in multiple files, lol.

So, what I’d like: right-click on Materials window, command “Delete Unused Materials”, which would simply walk through all Materials, if “unused” flag is true, then it’s deleted.

Simple, one-step cleanup.

This should be pretty easy, one would think, since the Materials have an “unused” flag already. I know it’s dumb, but it would save a lot of time when combining multiple things in Rhino and cleaning up the project later.

If there’s a way to script this, btw, please let me know; I don’t really have even the basics of Rhino scripting right now, but automation of things like this would save me time.

Have you tried the command _Purge?

Nope. What does that do?

image

Tried it. That did the trick! Thank you, I wouldn’t have ever figured that out!

1 Like

Hi @Gregory_Wolfe ,

Using the options menu in the Materials panel, I was unable to repeat the behavior you described…

The used materials are not deleted for me here in Rhino 8. Check if you might need to update your service release from Rhino - Downloads and if you still have this issue, email tech@mcneel.com with the results of your SystemInfo command and a small sample file please so we can try and reproduce the bug for our developers.