Could anyone please give me some c# samples to get a list of all my materials in current RhinoDoc? I would like to get all used materials’ name and texture files’ name and path of the material.
I am confused with the difference between MaterialTable and RenderMaterialTable. rhinoDoc.Materials would return a MaterialTable, rhinoDoc.RenderMaterials would return a RenderMaterialTable, what’s the difference?
RenderMaterialTable is the new, preferred way of accessing materials. You get instances of
For all textures you can iterate over the
RenderEnvironment all derive from
For RhinoCycles (which provides Raytraced and Rhino Render) I don’t directly access these tables, though, since I get material info via the ChangeQueue mechanism.
But iterate over
doc.RenderTextures to get these.