I have 3 objects
MyObj = #($box001,$box002,$sphere001)
In my case, I want to change the wirecolor of all the objects to be red but I don't want to change the color on MyObj array, then I want to select objects that have become red.
for o in objects do
(
o.wirecolor = (color 255 0 0)
for i in MyObj do
(
i.wirecolor = -- don't change this
-- What next ? :o
)
)
I tried this but, it doesn't work.
Any suggestions?
Thank you
By
Comments (8)
Comment policy
.
yess that's what I need :D
thanks miauu
but how to select them (objects with red color) ?
with 'select o' its not working correctly
.
You have to use selectMore 0, but this is slow(in scene with many many objects) compared to this:
Kostadin is right. "SelectMore" fn is slow. Anyway this is similar solution in one line
MyObj = #($box001,$box002,$sphere001)
select (for o in objects where findItem MyObj o == 0 and o.wirecolor = red collect o)
hi barigazy
thank you for your attention :)
its good in one line like your scripts. but there is no function to change the color of objects to be red first, then select the objects. or vice versa: select and then change the colors...
so how to make it in one line ? :D
I had read the MXS help
yup, 'selectmore' make the process slower
your script is good for faster processing
its working correctly :D
thanks again Miauu
MyObj = #($box001,$box002,$sphere001)
select (for o in objects where findItem MyObj o == 0 collect (o.wirecolor = red; o))
yess, cool.... its working correctly :D
thank you very much barigazy