splinecraft
12/21/2017 - 11:32 PM

swap ge/persp

swap ge and persp views

import maya.cmds as cmds

persp = cmds.getPanel(withLabel='Persp View')
ge = cmds.getPanel(withLabel='Graph Editor')

if cmds.getPanel(withFocus=True) == persp:
    cmds.panel(persp, edit=True, replacePanel=ge)
if cmds.getPanel(withFocus=True) == ge:
    cmds.panel(ge, edit=True, replacePanel=persp)