RhinoObjectGetRenderMaterial Method (ComponentIndex, Guid, ObjectAttributes) |
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)
Since: 6.0
Syntax public RenderMaterial GetRenderMaterial(
ComponentIndex componentIndex,
Guid plugInId,
ObjectAttributes attributes
)
Public Function GetRenderMaterial (
componentIndex As ComponentIndex,
plugInId As Guid,
attributes As ObjectAttributes
) As RenderMaterial
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.
- attributes
- Type: Rhino.DocObjectsObjectAttributes
Optional object attributes used to determine the material source, if
null the objects attributes are used.
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.
See Also