Click or drag to resize

RhinoObjectGetRenderMaterial Method (ComponentIndex, Guid)

Gets the RenderMaterial associated with this object if there is one. If there is no RenderMaterial associated with this object then null is returned. If null is returned you should call GetMaterial to get the material used to render this object.

Namespace:  Rhino.DocObjects
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public RenderMaterial GetRenderMaterial(
	ComponentIndex componentIndex,
	Guid plugInId
)

Parameters

componentIndex
Type: Rhino.GeometryComponentIndex
Returns the RenderMaterial associated with the specified sub object or the objects top level material if it is set to
plugInId
Type: SystemGuid
The plug-in specific material to look for.

Return Value

Type: RenderMaterial
Returns the RenderMaterial associated with the sub object identified by componentIndex if the component index is set to then the top level RenderMaterail is returned. If this method returns null it means there is no RenderMaterial associated with the object or sub object so you should may GetMaterial get the objects generic material.
Version Information

Rhino for Windows

Supported in: 6.0 BETA
See Also