accessing stereoPanel viewport

accessing stereoPanel viewport

Anonymous
Not applicable
432 Views
0 Replies
Message 1 of 1

accessing stereoPanel viewport

Anonymous
Not applicable

I'm trying to make a python script to hide everything in the stereo viewport by pression a hotkey. It works fine with a regular viewport but i just can't get it to work on a stereo. Can anyone help me out?

#-----------------------------------------------------------------
import maya.cmds as cmds

currentPanel = cmds.getPanel(wf=1)
print "Selected Panel is: " + currentPanel
if currentPanel == "StereoPanel":
state = cmds.modelEditor( currentPanel, query = True, nurbsCurves = True)
# ------ this is where i get errors, can't set the state variable
if state == True:
cmds.StereoPanelEditor( currentPanel, e=1, allObjects = False )
else:
state = cmds.modelEditor( currentPanel, query = True, nurbsCurves = True )
if state == True:
cmds.modelEditor( currentPanel, e=1, allObjects = False )
#cmds.modelEditor( currentPanel, e=1, nurbsCurves = False )
#cmds.modelEditor( currentPanel, e=1, locators = False )
cmds.modelEditor( currentPanel, e=1, polymeshes = True )
#cmds.modelEditor( currentPanel, e=1, handles = False )
#cmds.modelEditor( currentPanel, e=1, joints = False )
cmds.modelEditor( currentPanel, e=1, pluginShapes = True )
else:
cmds.modelEditor( currentPanel, e=1, allObjects = True )
cmds.modelEditor( currentPanel, e=1, nurbsCurves = True )
cmds.modelEditor( currentPanel, e=1, locators = True )
cmds.modelEditor( currentPanel, e=1, polymeshes = True )
cmds.modelEditor( currentPanel, e=1, handles = True )
cmds.modelEditor( currentPanel, e=1, joints = True )
cmds.modelEditor( currentPanel, e=1, pluginShapes = True )
#-----------------------------------------------------------------

0 Likes
433 Views
0 Replies
Replies (0)