Returns or modifies the color source of an object. The color used to display objects is specified in one of four ways:
Color from layer. The object's layer determines the object's color.
Color from object. The object's color is set by the object itself.
Color from material. The object's diffuse material color determines the object's color.
Color from parent. For objects with parents, like objects in block instances, use parent's color source. If no parent, treats as color from layer.
Rhino.ObjectColorSource (strObject [, intSource])
Rhino.ObjectColorSource (arrObjects, intSource)
strObject |
Required. String. The identifier of the object. |
||||||||||
arrObjects |
Required. Array. An array of strings identifying the objects to modify. |
||||||||||
intSource |
Optional. Number. The new color source. If omitted, the current color source is returned. Note, if arrObjects is specified, intSource is required.
|
Number |
If a color source is not specified, the current color source if successful. |
Number |
If a color source is specified, the previous color source if successful. |
Number |
If arrObjects is specified, then the number of objects modified if successful. |
Null |
If not successful, or on error. |
Dim arrObjects, strObject
arrObjects = Rhino.GetObjects("Select objects to reset color source")
If IsArray(arrObjects) Then
For Each strObject In arrObjects
Rhino.ObjectColorSource strObject, 0
Next
End If