Select by 3 wirecolors

Hi cant seem to figure out how to select objects in the scene with 3 wirecolors

so lets say i have 6 objects
1 object is ( blue ) color 8 8 136)
1 object is ( red ) color 135 6 6 )
1 object is ( green ) color 6 135 6 )

the rest are pink so how can i select blue - red and green at once
so far with my code i can only select 1 color at once.

select (for o in objects where o.wirecolor == (color 8 8 136) collect o)

any help would be appreciated
thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pixamoon's picture

re: select 3 wirecolors

Hi,

I think it can work this way:

select (for o in objects where o.wirecolor == (color 135 6 6 ) or o.wirecolor == (color 8 8 136) or o.wirecolor == (color 6 135 6) collect o)

Hope it helps :)

barigazy's picture

...

Short way ;)

select (for o in objects where (findItem #(red,green,blue) o.wirecolor) != 0 collect o)

bga

miauu's picture

.

(	 
	objsArr = for o in objects collect
		(
			case o.wirecolor of
			(
				(green): o
				(blue): o
				(red): o
				default: dontCollect
			)
		)
	selectMore objsArr
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.