View Single Post
# 2 04-09-2006 , 09:00 AM
skywola's Avatar
Registered User
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Not one hundred percent sure if this is what you are attempting, but I modified a bit and the results appear that they may be what you want . . .

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

// this is the line that was throwing the error:
//xray=0

editMenuUpdate MayaWindow|mainEditMenu;

Congrats on the coding, I have done a lot of MEL and I'm not so familiar with this . . . what the heck are you actually using
it to do?


"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche