Isolate selection and objectSets

Isolate selection and objectSets

mcw0
Advisor Advisor
567 Views
2 Replies
Message 1 of 3

Isolate selection and objectSets

mcw0
Advisor
Advisor

When a selection is isolated in a panel, an objectSet is created.  What is special about that objectSet that Maya knows to use it for isolating in a panel?  Why not use any other objectSet that exists in the scene?  I'm not seeing any special connections.

0 Likes
Accepted solutions (1)
568 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

This is quite complex, and to be honest it's too far under the hood for me to really access it.

 

Here is what I can tell you about it:

How isolate selection functions and what is created/deleted when the button is activated/deactivated is handlet by a internal mel procedure  called "modelPanelBarIsolateSelectCallback" which runs on the change command of the iconTextCheckBox "isolateSelectBtn".

#Python Query for chancecommand on isolate select button
iconTextCheckBox("MainPane|viewPanes|modelPanel4|modelPanel4|modelEditorIconBar|flowLayout6|formLayout46|IsolateSelectedBtn", q=True, cc = True )

#Result
modelPanelBarIsolateSelectCallback("IsolateSelectedBtn", "MainPane|viewPanes|modelPanel4|modelPanel4|modelPanel4", "MainPane|viewPanes|modelPanel4|modelPanel4|modelEditorIconBar"); restoreLastPanelWithFocus();

Sadly when looking for this procedure on my computer I couldn't find anything and googling for it only gave me wrap functions that call this function as is...

My guess is that this function creates either a global variable that stores the information as to which modelpanel belongs to which set, or the information is stored somewhere on a hidden UI element withing MainPane or viewPanes.

Now, I honestly never looked into this before today, because whenever I needed to find the objetSet that is connected to a modelPanel, I just used the "isolateSelect" command to query it.

string $mP = "modelPanel4";
string $vo = `isolateSelect -q -vo $mP`;
print($vo)

Could that might be helpful for what you are trying to do?

 

 

 

Message 3 of 3

mcw0
Advisor
Advisor

@Kahylan 

 

Thanks for looking into this.  I was too tired to go digging through scripts yesterday.  I thought that if I changed the objectSet membership, that what was isolated would also change.  Not the case.  Nothing I did would isolate what I wanted, when I wanted.  But late in the day, a light bulb went off.  Instead of dealing with isolating geo, I just hid everything else.  Much easier and works every time.

Actually, now that I think about it, there could be a snag in this approach.  If there are connections on visibility either on the transform or the shape node.  But that can also be dealt with.