ObjectPrintColorSource

Returns or modifies the print color source of an object.  The color used to print objects is specified in one of four ways:

  1. Print color from layer.  Use the print color assigned to the object's layer.

  2. Print color from object.  Use the print color that is assigned to the object.

  3. Print color from display.  Use the object's display color.

  4. Print color from parent.  For objects with parents, like objects in block instances, use parent's print color.  If no parent, treats as print color from layer.

Syntax

rhinoscriptsyntax.ObjectPrintColorSource ( object_ids, source=None )

rhinoscript.object.ObjectPrintColorSource ( object_ids, source=None )

Parameters

object_ids

Required.  String, Guid or list of Guids.  The identifiers of the objects.

source

Optional.  Number.  The new print color source.  If omitted, the current print color source is returned.  Note, if object_ids is a list or tuple,  source is required.

Value

Description

0

Print color by layer.

1

Print color by object.

2

Print color by display.

3

Print color by parent.

Returns

Number

If a print color source is not specified,  the current color source if successful.

Number

If a print color source is specified, the previous color source if successful.

Number

If object_ids is a list or tuple specified, then the number of objects modified if successful.

Example

import rhinoscriptsyntax as rs

objects = rs.GetObjects("Select objects to reset print color source")

if objects:

    for object in objects: rs.ObjectPrintColorSource(object, 0)

Also See

ObjectPrintColor