Last active
March 14, 2018 05:21
-
-
Save yamadaaaaaaa/6a918f058be38505fecc545fddfed606 to your computer and use it in GitHub Desktop.
clean up panel for maya
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
# -*- coding: utf-8 -*- | |
# python for maya | |
import maya.cmds as cmds ##cmd | |
import maya.mel as mel ##mel | |
def main(): | |
mel.eval('panelEditor("Layout");') | |
layoutList = cmds.textScrollList( 'PanelEditorPanelsScrollList', q = 1, allItems = 1 ) | |
defPanelList = [u'Top View', u'Side View', u'Front View', u'Persp View', u'Outliner', \ | |
u'Graph Editor', u'Dope Sheet', u'Trax Editor', u'Camera Sequencer', \ | |
u'Hypergraph Hierarchy', u'Hypershade', u'Visor', u'Node Editor', \ | |
u'Create Node', u'UV Texture Editor', u'Render View', u'Blend Shape', \ | |
u'Dynamic Relationships Editor', u'Relationship Editor', u'Reference Editor', \ | |
u'Component Editor', u'Paint Effects', u'Script Editor', \ | |
u'UV Editor', u'Profiler'] | |
for ilayoutList in layoutList: | |
if not ilayoutList in defPanelList: | |
cmds.textScrollList( 'PanelEditorPanelsScrollList', e = 1, si = ilayoutList ) | |
mel.eval( 'panelEd_DeletePanel;' ) | |
mel.eval( 'deleteUI $gPanelEditorWnd;' ) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment