Hi all,
In a python script I’m trying to retrieve the renderMaterial of an object, but it seems I’m not doing it right. This returns an error:
import Rhino
objTypesFilter = Rhino.DocObjects.ObjectType.Brep & Rhino.DocObjects.ObjectType.Mesh
rc, objRef = Rhino.Input.RhinoGet.GetOneObject( "Select object", False, objTypesFilter )
obj = objRef.Object()
renderMaterial = obj.Attributes.RenderMaterial
In my defense the error is not super helpful:
I’m testing this script on the most simple object possible:
sample.3dm (65.6 KB)
My Rhino version:
Rhino 8 SR8 2024-6-11 (Rhino 8, 8.8.24163.12481, Git hash:master @ ded4d86ca901dbeaf13ee84f79b3e91b22da4880)
What is the right way to get the renderMaterial of a RhinoObject in RhinoCommon ?
8 posts - 3 participants