Hi all:
I'm writing .py code to speed up isolateSelect.  Almost everything is
working.  BUT, when I invert the selected faces and then toggle
isolate select w/Python, Maya hide the newly selected faces.

I can toggle the hiding of selected faces w/this:
def pixl_isolateSelected():
        curPanel = cmds.getPanel (up=1); #Get cam under pointer
        cmds.isolateSelect ( curPanel, state = not(cmds.isolateSelect
(curPanel, q=1, state = 1)))

I can invert the selection w/this:
def pixl_invertIsolated():
        mm.eval('InvertSelection')

However, once the selection is inverted, Maya will continue to hide/
show the faces in the original selection (ie not the updated selection
of faces) - but only when invoked from Python.
If I use the menu or a mel script, the correct faces are hidden
(membership of "modelPanelXXViewSelectedSet" is updated).
Here's the mel which works correctly:
global proc pixl_isolateSelected()
{
    string $curPanel = `getPanel -up`; //Get cam under pointer
    enableIsolateSelect $curPanel (!`isolateSelect -q -state
$curPanel`);
}

Can anyone see where the problem is?
Thanks.

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to