PDA

View Full Version : Just a quick question..


Animasta
09-11-2009, 01:33 AM
First off, I am by no means a programmer (literally, the furthest I got was 'hello world'), but I am wanting a quick and easy way of toggling Xray on/off on objects I'm working on. So far I've succeeded, but using two different mel scripts.

displaySurface -x 1; -turns xray on for selected object/surface
displaySurface -x 0; -turns xray off for selected object/surface

I was wondering if anyone could help me group these together so that I only need one button to press.

Any help is appreciated :)

mlefevre
09-11-2009, 08:19 AM
Hi,


string $panel = `getPanel -wf`; //Find last panel that received focus
modelEditor -e -xray ( !`modelEditor -q -xray $panel` ) $panel; //Toggle X-Ray

Animasta
09-11-2009, 07:28 PM
Thank you very much :D

CGTalk Moderation
09-11-2009, 07:28 PM
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.