Multiplicated materials in grasshopper

I don’t know if it’s Elefront’s problem or Value List component but I noticed a strange behavior which can be very heavy on a computer when we are working in a big file for a while. Value List component connected to the material slot multiplicates the same material by a number of geometries which ever had this material assigned.

I’m not familiar with material aspect of it but that is how the Value Lists have always worked. You have to re-drag to repopulate the Value List if new Values have been added.

It looks like it makes a new material value when you copy an object, possible feature or bug.

Well, maybe it’s not about Value List but about Materials. I tested it differently, with the use of Material Table component from the Human plugin and this is what I got.

I know I can create sets to eliminate duplicates but It looked for me as odd behavior.

That is how the material table works in Rhino.In an empty document if you add on material in the material editor, but assign it to 10 objects the material table will show 10 entries.

Instead of looking at the MaterialTable, one should look at the RenderMaterialTable.

Ok, now I understand. I assume you write about RhinoCommon? I don’t know much about it yet.

If you type your own code you’d be using the RenderMaterials member of a RhinoDoc instance.

Just wanted to start a new thread with the same issue. Trying both Elefront and Human to get the material list, they show the MaterialTable it seems, which is not what we need.

@andheum Is there a specific reason you use the Material list and not the actual list of materials in the Materials Panel. As you can see they are very different.

Here you can see the list of Materials and the Materials Panel. Is there a way to get that list in Grasshopper?

There is a funny state of things where Rhino 6 introduced an entirely different way of handling/referencing materials. Rhino 5-style materials and Rhino 6-style materials coexist in a way I haven’t entirely wrapped my head around - right now Human only addresses Rhino 5-style materials. I’d love to update it to deal with the Rh6 material table system but I have never had the time to look into it.

Here a short video illustrating the differences between the doc.Materials and doc.RenderMaterials table: