Last active
December 16, 2015 13:19
-
-
Save cardin/5440515 to your computer and use it in GitHub Desktop.
Closes all Maya application windows in the scene, leaving only the main Maya window and the Script Editor.
This file contains 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
// MEL | |
$allWindows = `lsUI -windows`; | |
for ($window in $allWindows) | |
if ($window != "MayaWindow" && $window!= "scriptEditorPanel1Window") | |
deleteUI $window; | |
evalDeferred "deleteUI scriptEditorPanel1Window"; | |
# Python | |
import maya.cmds as cmds | |
allWindows = cmds.lsUI (windows=True) | |
window = [name for name in allWindows if name != "MayaWindow"] | |
cmds.evalDeferred('cmds.deleteUI(window)'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script now is able to close Script Editor as well.