View Full Version : Toggle BOX Mode / See though Button

05 May 2008, 05:36 AM
Is there a easy way to set the BOX MODE and SEE THOUGH object properties?

I would like to make it into a simple button + quad menu item that will turn the selected objects into box or see though mode?

If someone could help me out i would appreciate it.

05 May 2008, 11:44 AM
the macro recorder is (usually) your friend; it reported the properties .xray and .boxMode as the ones you'll want to access...

-- set see-through on selected objects ON:
for o in (getCurrentSelection()) do ( o.xray = true )

-- OFF:
for o in (getCurrentSelection()) do ( o.xray = false )

-- Toggle:
for o in (getCurrentSelection()) do ( o.xray = not o.xray )

Code for box mode is suspiciously similar :)

CGTalk Moderation
05 May 2008, 11:44 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.