CopyMaterial

Copies the definition of a source material to a destination material.

Syntax

rhinoscriptsyntax.CopyMaterial (source_index, destination_index)

rhinoscript.material.CopyMaterial (source_index, destination_index)

Parameters

source_index

Required.  Number.  The index of the source material.

destination_index

Required.  Number.  The index of the destination material.

Returns

Boolean

True or false indicating success or failure.

Example

import rhinoscriptsyntax as rs

src = rs.LayerMaterialIndex("Default")

dest = rs.LayerMaterialIndex(rs.CurrentLayer())

if src>=0 and dest>=0 and src!=dest:

    rs.CopyMaterial( src, dest )

Also See

LayerMaterialIndex

ObjectMaterialIndex