Okay, so I am aware of rs.ObjectMaterialIndex to change a object’s material index, but I am in a tussle trying to figure out how to do a simple material assignment to an object. Think of this as simulating a _visApplyMaterial or Apply Material to Object BUT without prompting the user for any input whatsoever. Here’s what I have so far:
Plane = rs.AddPlaneSurface( rs.WorldXYPlane(), 5.0, 5.0 ) rs.SelectObject (Plane) rs.ObjectMaterialSource (Plane,1) #rs.ObjectMaterialIndex ("not too sure what to do with this!")
I want to apply the material called White Reflective (ID: 7a1ea260-ded9-4cec-9216-f070a11d4720) to the plane.