Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Isolate Selection in all views

Isolate Selection in all views

Anonymous
Not applicable
1,163 Views
1 Reply
Message 1 of 2

Isolate Selection in all views

Anonymous
Not applicable

Hello! I want to make Isolate Selection in all views at the same time. There ia my script, but it hide all objects even selected. Where is an error?

{  string $panels[] = `getPanel -type modelPanel`; //names of all viewports

string $currentPanel;  //current array element


//iteration over each element of the array
for ($currentPanel in $panels) {
    string $state = `isolateSelect -q -state $currentPanel`; //state of current viewport
    //isolate on-off checking
    if ($state)
    {isolateSelect -state 0 $currentPanel;}  
    else    {isolateSelect -state 1 $currentPanel;}
}
}

 

Thanks

0 Likes
Accepted solutions (1)
1,164 Views
1 Reply
Reply (1)
Message 2 of 2

tdHendrix
Collaborator
Collaborator
Accepted solution

Hi, you have to enableIsolateSelect in each view first before it will work like this:

 

 


{ string $panels[] = `getPanel -type modelPanel`; //names of all viewports //iteration over each element of the array for ($currentPanel in $panels) { isolateSelect -loadSelected $currentPanel; string $state = `isolateSelect -q -state $currentPanel`; //state of current viewport //isolate on-off checking if ($state) { enableIsolateSelect $currentPanel false; isolateSelect -state 0 $currentPanel; } else { enableIsolateSelect $currentPanel true; isolateSelect -state 1 $currentPanel; } } }

Greg Hendrix - Senior Technical Animator
LinkedIn : Twitter