How to Delete a Custom Material


#1

I accidentally clicked the + button on the material’s editor window.

How do I delete custom materials I had no intention to create?

If I select and click I just get a beep.


#2

Right click on it. Select “Move It To Trash”


#3

I am using a trackpad. I am getting nothing right clicking ().


(Dan Belcher) #4

I am also using a trackpad and I have no trouble “right” clicking (two-finger click) a Custom Material and selecting Delete Material from the drop-down.


#5

Hmmmm, I get absolutely nothing “right” clicking on any material. I have to “right” click on the object to get that point.

I have version 5.0.2.


(Dan Belcher) #6

Ah, my mistake, sorry. I was testing this in a RhinoWIP. This bug should be fixed in the 5.1 update…coming very soon. Please let me know if you are still seeing it in the 5.1 update.


#7

Is there any way to delete a material with RhinoScriptSyntax?


(Dan Belcher) #8

Are you trying to reset the material to the default material?


#9

No, I am trying to remove the material from the “Model Materials” section of the Materials window:

I want to remove the “Unnamed” material here. Here is a section of my script:

index = rs.AddMaterialToObject(obj)
rs.MaterialTexture(index, filename)
rs.Command("_ComputeVertexColors")
rs.ResetMaterial(index)
# I would like to delete the material I just created here

(Dan Belcher) #10

@pascal Do you know of a clever way to remove a material from all objects? I don’t think we can get around the fact that Rhino for Mac’s material editor is not going to refresh even if you can.


(Pascal Golay) #11

Hi Dan - setting objects to get their material ‘by layer’ would restore the default state. Is that what you mean? You can’t have no material though - it would either be the default material, by object, or the layer material.

-Pascal


(Dan Belcher) #12

Yeah, that’s what I thought. I think this is simply a bug in Rhino 5 for Mac. The material editor is obsoleted in Rhino 6 for Mac, so there’s really no bug to log. But this is a limitation. That said, once the material editor is restarted, I bet the list of objects “resets” after a call to ResetMaterial.