Created
April 22, 2020 09:04
-
-
Save kohyuk91/0e164fae75172f92cdceb573f2f5d25c 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
from maya import cmds | |
def main(): | |
window = "graphEditor1Window" | |
try: | |
if cmds.workspaceControl(window, q=True, floating=True): | |
cmds.warning("There is no docked '{0}'.".format(window)) | |
return | |
except: | |
cmds.warning("'{0}' does not exist.".format(window)) | |
return | |
# If collapsed, raise. If raised, collapse. | |
cmds.workspaceControl(window, e=True, collapse=True) if cmds.workspaceControl(window, q=True, r=True) else cmds.workspaceControl(window, e=True, restore=True) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment