IsMaterialReference

Verifies a material is referenced from another file.

Syntax

rhinoscriptsyntax.IsMaterialReference (material_index)

rhinoscript.material.IsMaterialReference (material_index)

Parameters

material_index

Required.  Number.  The zero-based material index.

Returns

Boolean

True if successful, otherwise False.

None

On error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject()

if obj:

    index = rs.ObjectMaterialIndex(obj)

    if rs.IsMaterialReference(index):

        print "The material is referenced from another file."

    else:

        print "The material is not referenced from another file."

Also See

IsLayerReference

IsLightReference

isObjectReference