Copies the definition of a source material to a destination material.
Rhino.CopyMaterial (intSrcIndex, intDstIndex)
intSrcIndex |
Required. Number. The index of the source material. |
intDstIndex |
Required. Number. The index of the destination material. |
Boolean |
True or false indicating success or failure. |
Null |
On error. |
Dim intSrcIndex, intDstIndex
intSrcIndex = Rhino.LayerMaterialIndex("Default")
intDstIndex = Rhino.LayerMaterialIndex(Rhino.CurrentLayer)
If (intSrcIndex >= 0) And (intDstIndex >= 0) And (intSrcIndex <> intDstIndex) Then
Rhino.CopyMaterial intSrcIndex, intDstIndex
End If