Copies the definition of a source material to a destination material.
rhinoscriptsyntax.CopyMaterial (source_index, destination_index)
rhinoscript.material.CopyMaterial (source_index, destination_index)
source_index |
Required. Number. The index of the source material. |
destination_index |
Required. Number. The index of the destination material. |
Boolean |
True or false indicating success or failure. |
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 )