View Single Post
# 1 04-09-2006 , 05:49 AM
Falott's Avatar
Registered User
Join Date: Jan 2005
Location: vienna
Posts: 1,095

Toggle Isolate Selected

// Toggle Isolate Selected
//

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.");

xray=0.editMenuUpdate MayaWindow|mainEditMenu;





there is something wrong with this script. it isolates the selection and toggles unselected back visible when executed again. but no matter which object is selected later on the script is affecting my first isolated object only.




the following script is taken from maya´s embedded scripts and does isolate selected but does not bring it back to visibility.


{ string $currentPanel = `getPanel -withFocus`;
string $panelType = `getPanel -to $currentPanel`;
if ($panelType == "modelPanel") {
if (size(`ls -sl`) > 0)
{ enableIsolateSelect $currentPanel true; }
else
{ enableIsolateSelect $currentPanel false; } }}



anyone knows how to fix this?


everything starts and ends in the right place at the right time.