ResetMaterial

Resets a material to Rhino's default material.

Syntax

Rhino.ResetMaterial (intMaterialIndex)

Parameters

intMaterialIndex

Required.  Number.  The zero-based source material index.

Returns

Boolean

True if successful, False if not successful.

Null

On error.

Example

Dim strObject, intIndex

strObject = Rhino.GetObject("Select object")

If Not IsNull(strObject) Then

  intIndex = Rhino.ObjectMaterialIndex(strObject)

  If (intIndex > -1) Then

    Rhino.ResetMaterial intIndex

  End If

End If

Also See

LayerMaterialIndex

ObjectMaterialIndex