Returns the identifiers of all objects based on the objects' color. Object colors are represented as RGB colors. An RGB color specifies the relative intensity of red, green, and blue to cause a specific color to be displayed.
rhinoscriptsyntax.ObjectsByColor (color, select=False, include_lights=False)
rhinoscript.selection.ObjectsByColor (color, select=False, include_lights=False)
color |
Required. |
select |
Optional. Boolean. Select the objects. If omitted, the objects are not selected (False). |
include_lights |
Optional. Boolean. Include light objects. If omitted, light objects are not returned (False). |
List |
A list of Guids identifying the objects if successful. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Pick any object")
if obj:
color = rs.ObjectColor(obj)
rs.ObjectsByColor(color, True)