Returns or modifies the print color of an object.
rhinoscriptsyntax.ObjectPrintColor (object_ids, color=None)
rhinoscript.object.ObjectPrintColor (object_ids, color=None)
object_ids |
Required. String, Guid or list of Guids. The identifiers of the objects. |
color |
Optional. The new print color value. If omitted, the current object color is returned. Note, if object_ids is a list or tuple, color is required. |
Color |
If a print color value is not specified, the current print color value if successful. |
Color |
If a print color value is specified, the previous print color value if successful. |
Number |
If object_ids is a list or tuple specified, then the number of objects modified if successful. |
import rhinoscriptsyntax as rs
objects = rs.GetObjects("Select objects to change print color")
if objects:
color = rs.GetColor()
if color:
for object in objects: rs.ObjectPrintColor(object, color)