Last active
February 26, 2021 22:49
-
-
Save tb-animator/7cdc142593069c80f43989089331004b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import maya.cmds as cmds | |
| ''' | |
| quick and dirty graph editor collape toggle tool | |
| ''' | |
| def toggleDockedGraphEd(): | |
| GraphEdWindow = None | |
| state = False | |
| if cmds.animCurveEditor('graphEditor1GraphEd', query=True, exists=True): | |
| graphEdParent = cmds.animCurveEditor( 'graphEditor1GraphEd', query=True, panel=True ) | |
| if cmds.panel(graphEdParent, query=True, exists=True): | |
| GraphEdWindow = cmds.panel(graphEdParent, query=True, control=True).split('|')[0] | |
| if GraphEdWindow: | |
| state = cmds.workspaceControl(GraphEdWindow, query=True, collapse=True) | |
| else: | |
| mel.eval('GraphEditor;') | |
| cmds.workspaceControl(GraphEdWindow, edit=True, collapse=not state) | |
| ''' | |
| # method: | |
| import toggleDockedGraphEditor as tge | |
| reload(tge) | |
| tge.toggleDockedGraphEd() | |
| ''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment