ScriptSpot

Forum topic · General Scripting

Color Class

By Shade926 · 2013-04-17

Description

Hello

Im trying to get all the boxes within my scene to be coloured the same but diffrently to all the other shapes in my scene

The code i have is:

try(destroydialog ::test_button)catch()
rollout test_button "TEST"
(
button findclass "Colour All Class Boxes"
on findclass pressed do
(
apropos "box" do for obj in objects do (obj.wirecolor = color (random 0 255) (random 0 255) (random 0 255))
)
)
createDialog test_button 160 100

Keeps coming up with errors

Thanks

Comments (2)

barigazy · 2013-04-17


try(destroydialog ::test_button)catch()
rollout test_button "TEST"
(
button findclass "Colour All Class Boxes"
on findclass pressed do
(
for b in geometry where isKindOf b Box do b.wirecolor = random black white
)
)
createDialog test_button 160 100