Thread: X-Ray shortcut
View Single Post
# 1 29-12-2004 , 05:46 PM

X-Ray shortcut

In the tutorials you use an X-Ray shortcut now ive found a script which can do this only it does not say where i should put this?

And how can i make it a button on the custom menu ?

// Toggle Xray
//

string $visPanel[]=`getPanel -vis`;
int $mode;
if (size($visPanel)>0)
{
for ($panel in $visPanel)
{
if (`match "^modelPanel" $panel`=="modelPanel")
{
$mode=`modelEditor -q -xray $panel`;
if ($mode>0)
modelEditor -e -xray 0 $panel;
else
modelEditor -e -xray 1 $panel;
}
}
print ("\nxray="+$mode+".");
} else
print ("\nNo model panels to modify.");