@Bianchi wrote:
I'd like to identify points or text dots that have a black color or RGB (0, 0, 0). How do I go about identifying them?
I have used rs.ObjectColor, but it returns Color [Black] or Color [White] if I have not previously changed the color of that particular point previously. Is there a way to handle Color directly or as a variable?
Here is a sample of my current code:
if rs.IsPoint(indiv) or rs.IsTextDot(indiv): index = 0 if rs.ObjectColor(indiv) != (0, 0, 0, 0) or rs.ObjectColor(indiv) != Color [Black]: print ('entered', rs.ObjectColor(indiv), rs.ObjectColor(indiv) != RGB(0,0,0)) individual = 'ptWeight'
So the goal of this snippet is to identify if a point (the GUID is inside the variable 'indiv') has been assigned a new color other than the default, black. If it has been assigned a different color, then it will assign the value 'ptWeight' to the variable individual. What's the best way for me to go about catching points that are not the default color without having to base my output on a point inside Rhino? This would need this to work even without setting the checking condition to any points already inside the Rhino model.
Posts: 4
Participants: 3