def outliner(self): self.duplicatecFrameLayout = mc.frameLayout(label="duplicate", collapsable=True, borderStyle="etchedIn", w=300, h=550, en=1) mc.frameLayout(labelVisible=False) panel = mc.outlinerPanel() outliner = mc.outlinerPanel(panel, query=True, outlinerEditor=True) mc.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showNamespace=True, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') mc.setParent('..') mc.setParent('..') mc.setParent('..')
def kmOutliner(self): # Create a new regular outliner in its own window mc.window(title="Outliner", toolbox=True) mc.frameLayout(labelVisible=False, width=300, height=500) panel = mc.outlinerPanel() outliner = mc.outlinerPanel(panel, query=True, outlinerEditor=True) mc.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showReferenceNodes=False, showReferenceMembers=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showNamespace=True, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') mc.showWindow()
def outlinerWin(self): if mel.window('autoProOutliner', exists=1): mel.deleteUI('autoProOutliner', window=1) mel.window('autoProOutliner', title="autoPro Outliner", iconName="autoProOut") mel.frameLayout(labelVisible=False) panel = mel.outlinerPanel() outliner = mel.outlinerPanel(panel, query=True, outlinerEditor=True) mel.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') mel.showWindow('autoProOutliner')
def view_outliner(floating=False): """ Toggle the outliner on as a dock window to the right side of the viewport, if floating is ture then toggle outliner to a floating window. makes sure to delete the dockControl UI when visibility is lost to ensure the name is available for maya. .. old:: panel_window = 'outlinerPanel1Window' if cmds.window(panel_window, q=True, exists=True): cmds.deleteUI(panel_window, window=True) else: panel = cmds.getPanel(withLabel='Outliner') cmds.outlinerPanel(panel, e=True, tearOff=True) """ # Constants TABLAYOUT = "MAM_TAB_LAYOUT" DOCK_CONTROL_OUTLINER = "MAM_DOCK_CONTROL_OUTLINER" if not cmds.paneLayout(TABLAYOUT, q=True, ex=True): cmds.paneLayout(TABLAYOUT, p="viewPanes") # mel.eval('$tmp = $gMainWindow')) # Creat or show outliner. if not cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, ex=True): cmds.dockControl( DOCK_CONTROL_OUTLINER, label="Outliner", width=280, content=TABLAYOUT, allowedArea=["left", "right"], area="right", ) # Tear it off or dock it depending on floating arg. vis_state = cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, vis=True) fl_state = cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, fl=True) cmds.dockControl(DOCK_CONTROL_OUTLINER, e=True, fl=floating) if vis_state and not fl_state == floating: pass else: cmds.dockControl( DOCK_CONTROL_OUTLINER, e=True, vis=not (cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, vis=True)) ) if not cmds.dockControl(DOCK_CONTROL_OUTLINER, q=True, vis=True): try: cmds.deleteUI(DOCK_CONTROL_OUTLINER) except RuntimeError: pass else: # Create outliner pane under tablayout if it's not there. outliner_window = "outlinerPanel1Window" if not cmds.control(outliner_window, q=True, ex=True): panel = cmds.getPanel(withLabel="Outliner") cmds.outlinerPanel(panel, e=True, p=TABLAYOUT) # cmds.control(outliner_window, e=True, p=TABLAYOUT) if floating: cmds.dockControl(DOCK_CONTROL_OUTLINER, e=True, height=600)
def outlinerWindow(): if cmds.window('outlinerWindow', exists = True): cmds.deleteUI('outlinerWindow', window = True) else: cmds.window('outlinerWindow') cmds.frameLayout( labelVisible=False ) panel = cmds.outlinerPanel() outliner = cmds.outlinerPanel(panel, query=True,outlinerEditor=True) cmds.outlinerEditor( outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showNamespace=True, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter' ) cmds.showWindow()
def hidesModelPanels(func, *args, **kwargs): """Decorator that will hide the model panels while the function is running and then restoring the layout when finished. This greatly speeds up operations that step through the timeline. When the function is being called, the main panel in Maya will go to single view and switch to the outliner. When finished, the original layout should be restored. To use. decorate the function like this:: @hidesModelPanels def myFunction(arg1, arg2, ...): # function body """ mainPane = mel.eval('string $tmpStr = $gMainPane;') cmds.panelHistory('mainPanelHistory', e=True, suspend=True) # go to single perspective cmds.paneLayout(mainPane, e=True, cn='single') mainPanels = cmds.paneLayout(mainPane, q=True, childArray=True) modelPanel = None visiblePanels = cmds.getPanel(vis=True) # find a model panel in the main single view panel for vp in visiblePanels: if cmds.getPanel(typeOf=vp) == 'modelPanel' and vp in mainPanels: modelPanel = vp break outlinerPanel = None # if there is no model panel then we don't need to replace it if modelPanel: # create a new outliner outlinerPanel = cmds.outlinerPanel(parent=mainPane) cmds.outlinerPanel(outlinerPanel, e=True, rp=modelPanel) try: return func(*args, **kwargs) except: pass finally: # delete the outliner we created and restore the layout if outlinerPanel: cmds.deleteUI(outlinerPanel, panel=True) # restore the previous panel layout cmds.panelHistory('mainPanelHistory', e=True, suspend=False) cmds.panelHistory('mainPanelHistory', e=True, back=True)
def eliminate_outliner_callback(client_data): # Get Info all_panels = mc.getPanel(type="outlinerPanel") or [] detachedPanels = [] for curPanel in all_panels: sc = mc.outlinerEditor(curPanel, q=True, selectCommand=True) if sc is not None: # if there are selectCommand set ... detachedPanels.append(curPanel) # Fix Error for curPanel in detachedPanels: mc.outlinerPanel(curPanel, e=True, unParent=True) # remove infected panel mc.file(uiConfiguration=False ) # mark as do not save ui info within scene file if (mc.optionVar(exists="useScenePanelConfig") and mc.optionVar(q="useScenePanelConfig") == 0): mel.eval("$gOutlinerPanelNeedsInit = 1;") # flag to restore later # Output if detachedPanels: msg = 'The outliner error is detected so.\nthe deducted outliner is removed.' mc.confirmDialog(title='Confirm', message=msg, button=['Okay']) mel.eval("initOutlinerPanel ();") # restore outliner if flagged
def _outliner_hide_set_member(): """Set outliner default display options Turn off `showSetMembers` for avoiding long wait on a big objectSet that being accidentally selected. """ options = { "showShapes": False, "showSetMembers": False, "showReferenceMembers": False, "showDagOnly": True, } avalon.logger.info("Disabling outliner set member display..") for outliner_pan in cmds.getPanel(type="outlinerPanel") or []: outliner = cmds.outlinerPanel(outliner_pan, query=True, outlinerEditor=True) # Set options cmds.outlinerEditor(outliner, edit=True, **options)
def test(): #################### # # # CleanUp # # # #################### if cmds.window(WINDOW_NAME, exists=True): cmds.deleteUI(WINDOW_NAME) for pan in cmds.lsUI(panels=True): if cmds.panel(pan, q=True, label=True).startswith("vuRenderTree_"): print "Delte: " + pan cmds.deleteUI(pan, panel=True) cmds.window(WINDOW_NAME) main = cmds.paneLayout(configuration='vertical3') #################### # # # Frame Left # # # #################### paneLeft = cmds.paneLayout(configuration='horizontal2', p=main) cmds.frameLayout(label="ShadingNodes:", li=3, borderVisible=False, p=paneLeft) cmds.nodeTreeLister('theTreeLister', expandToDepth=1, addItem=shaders) # Textures cmds.frameLayout(label="Textures:", li=3, borderVisible=False, p=paneLeft) panel = cmds.outlinerPanel(label="vuRenderTree_Outliner", menuBarVisible=False) outlinerEditor = cmds.outlinerPanel(panel, query=True,outlinerEditor=True) filterTextures = cmds.createNode("objectRenderFilter") cmds.setAttr(filterTextures + ".textures", True) cmds.outlinerEditor( outlinerEditor, edit=True, showDagOnly=False, filter=filterTextures) # # ToDo Later: # ######################################################################### # # # # # filterKeyable = cmds.createNode("objectAttrFilter") # # cmds.setAttr(filterKeyable + ".attrType ", 3) # # # # # ######################################################################### # # # #################### # # # Node Editor # # # #################### # formNodes = cmds.formLayout(p=main) # nEdit = cmds.scriptedPanel(type="nodeEditorPanel", label="Node Editor") # #cmds.formLayout(formNodes, e=True, af=[(centershelf,s,0) for s in ("top","left","right")]) # cmds.formLayout(formNodes, e=True, af=[(nEdit,s,0) for s in ("top", "bottom","left","right")]) formNodes = cmds.formLayout(p=main) nEdit = cmds.scriptedPanel(type="nodeEditorPanel", label="vuRenderTree_NodeEditor") centershelf = cmds.shelfLayout("vuRenderUtils", p=formNodes) #cmds.formLayout(formNodes, e=True, af=[(centershelf,s,0) for s in ("top","left","right")]) #cmds.formLayout(formNodes, e=True, af=[(nEdit,s,0) for s in ("bottom","left","right")]) cmds.formLayout(formNodes, e=True, attachForm=[ (centershelf,"top",0), (centershelf,"left",0), (centershelf,"right",0), (nEdit,"bottom",0), (nEdit,"left",0), (nEdit,"right",0) ], attachControl=[ (nEdit, "top", 0, centershelf) ]) #################### # # # Frame Right # # # #################### paneRight = cmds.paneLayout( configuration='horizontal3', p=main) # Shading Groups #rightTabs = cmds.tabLayout() cmds.frameLayout(label="ShadingGroups:", li=3, borderVisible=False, p=paneRight) outlinerShadingGroups = cmds.outlinerPanel(label="vuRenderTree_Outliner", menuBarVisible=False) outlinerEditor = cmds.outlinerPanel(outlinerShadingGroups, query=True,outlinerEditor=True) filterShadingGroups = cmds.createNode("objectTypeFilter") cmds.setAttr(filterShadingGroups + ".typeName", "shadingEngine", type="string") cmds.outlinerEditor( outlinerEditor, edit=True, showDagOnly=False, filter=filterShadingGroups) # Shaders cmds.frameLayout(label="Shaders:", li=3, borderVisible=False, p=paneRight) outlinerShaders = cmds.outlinerPanel(label="vuRenderTree_Outliner", menuBarVisible=False) outlinerEditor = cmds.outlinerPanel(outlinerShaders, query=True,outlinerEditor=True) filterShaders = cmds.createNode("objectRenderFilter") cmds.setAttr(filterShaders + ".shaders", True) cmds.outlinerEditor( outlinerEditor, edit=True, showDagOnly=False, filter=filterShaders) #cmds.tabLayout( rightTabs, edit=True, tabLabel=((outlinerShadingGroups, 'ShadingGroups'), (outlinerShaders, 'Shaders'))) # Outliner cmds.frameLayout(label="Outliner:", li=3, borderVisible=False, p=paneRight) cmds.outlinerPanel(label="vuRenderTree_Outliner", menuBarVisible=True) cmds.showWindow()
def ui_createUI(self): if m.window(UI_WIN_NAME, exists=True): if m.window(UI_WIN_NAME, q=True, visible=True): return else: m.deleteUI(UI_WIN_NAME, window=True) self.window = m.window( UI_WIN_NAME, title=UI_WIN_TITLE, maximizeButton=False, ) m.scriptJob(event=['deleteAll', self.scriptJobDeleteAll], parent=self.window, protected=True) self.delUIScriptJobID = m.scriptJob( uiDeleted=[self.window, self.ui_onDeleteMainWin], protected=True) self.ui_LAY_mainForm = m.formLayout() # - - - - - - - - - - - - - - - - - self.ui_LAY_searchRow = m.rowLayout(numberOfColumns=8, adjustableColumn=2) self.ui_BTN_miscOperations = m.symbolButton(image=ICON_POPUP_MENU, width=22, height=22) self.loadUserCommandsFromXML() self.ui_POP_miscOperations = m.popupMenu(button=1) for command in self.userMenu: m.menuItem(parent=self.ui_POP_miscOperations, label=command[0], command=ft.partial(self.evalMelCommand, command[1])) m.menuItem(divider=True) m.menuItem(parent=self.ui_POP_miscOperations, label='Open FX Outliner Configuration File', command=ft.partial(self.openFileInEditor, XML_OUTLINER_CFG_FILE)) m.menuItem(parent=self.ui_POP_miscOperations, label='Open FX Outliner User Menu Configuration File', command=ft.partial(self.openFileInEditor, XML_USER_MENU_FILE)) m.menuItem(divider=True) m.menuItem(parent=self.ui_POP_miscOperations, label='Help', command=ft.partial(self.openFileInEditor, README_FILE)) m.setParent(self.ui_LAY_searchRow) self.ui_TFD_search = m.textField(enterCommand=self.ui_BTN_searchClick, alwaysInvokeEnterCommandOnReturn=True) self.ui_BTN_search = m.symbolButton(image=ICON_SEARCH, width=22, height=22, annotation='Perform Search', command=self.ui_BTN_searchClick) self.ui_BTN_searchCase = m.symbolCheckBox( image=ICON_CASE_SENSITIVE, width=22, height=22, annotation='Search: Case Sensitive', changeCommand=self.ui_BTN_searchCaseChange) self.ui_BTN_searchRegEx = m.symbolCheckBox( image=ICON_REGEX, width=22, height=22, annotation='Search: Regular Expression', changeCommand=self.ui_BTN_searchRegExChange) self.ui_BTN_searchType = m.symbolCheckBox( image=ICON_TYPE_SEARCH, width=22, height=22, annotation='Search: Search for Type', changeCommand=self.ui_BTN_searchTypeChange) self.ui_BTN_searchSelect = m.symbolCheckBox( image=ICON_SELECT_FOUND, width=22, height=22, annotation='Search: Select Result', changeCommand=self.ui_BTN_searchSelectChange) self.ui_BTN_searchShape = m.symbolCheckBox( image=ICON_SHAPE, width=22, height=22, annotation='Search: Include Shapes in Search', changeCommand=self.ui_BTN_searchShapeChange) # - - - - - - - - - - - - - - - - - m.setParent(self.ui_LAY_mainForm) self.ui_SEP_searchSeparator = m.separator(style='in', height=6) # - - - - - - - - - - - - - - - - - self.ui_LAY_outlinerForm = m.formLayout() self.ui_BTN_modeDropDown = m.button(height=24) # - - - - - - - - - - - - - - - - - self.generateOutlinerViews() self.ui_POP_mode = m.popupMenu(button=1) for viewCfg in self.state.outlinerViews: m.menuItem(parent=self.ui_POP_mode, label=viewCfg.name, command=ft.partial(self.ui_POP_mode_onClick, viewCfg)) lastPrebuildViewIndex = len(self.state.outlinerViews) self.loadOutlinerViewsFromXML() m.menuItem( parent=self.ui_POP_mode, divider=True, ) for i in range(lastPrebuildViewIndex, len(self.state.outlinerViews)): vc = self.state.outlinerViews[i] m.menuItem(parent=self.ui_POP_mode, label=vc.name, command=ft.partial(self.ui_POP_mode_onClick, vc)) # - - - - - - - - - - - - - - - - - m.setParent(self.ui_LAY_outlinerForm) fxOutlinerPanels = [ x for x in m.getPanel(type='outlinerPanel') if m.outlinerPanel(x, q=True, label=True) == OUTLINER_PANEL ] if fxOutlinerPanels: self.ui_PNL_outliner = fxOutlinerPanels[0] m.outlinerPanel(self.ui_PNL_outliner, e=True, unParent=True) m.outlinerPanel(self.ui_PNL_outliner, e=True, parent=self.ui_LAY_outlinerForm) else: self.ui_PNL_outliner = m.outlinerPanel(menuBarVisible=False, label=OUTLINER_PANEL) self.ui_EDT_outliner = m.outlinerPanel( self.ui_PNL_outliner, query=True, outlinerEditor=True, ) # - - - - - - - - - - - - - - - - - m.setParent(self.ui_LAY_outlinerForm) self.ui_LAY_outlinerToolbar = m.columnLayout() self.ui_BTN_showShapes = m.symbolCheckBox( image=ICON_SHOW_SHAPES, height=35, width=35, changeCommand=self.ui_BTN_showShapesChange, annotation='Show Shapes') self.ui_BTN_showSetMembers = m.symbolCheckBox( image=ICON_SHOW_SET_MEMBERS, height=35, width=35, changeCommand=self.ui_BTN_showSetMembersChange, annotation='Show Set Members') self.ui_BTN_selectSetMembers = m.symbolCheckBox( image=ICON_SELECT_SET_MEMBERS, height=35, width=35, changeCommand=self.ui_BTN_selectSetMembersChange, annotation='Select Set Members \ Assigned Objects') # - - - - - - - - - - - - - - - - - m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_BTN_modeDropDown, 'top', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachControl=(self.ui_BTN_modeDropDown, 'right', 2, self.ui_LAY_outlinerToolbar)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachNone=(self.ui_BTN_modeDropDown, 'bottom')) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_BTN_modeDropDown, 'left', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachControl=(self.ui_PNL_outliner, 'top', 2, self.ui_BTN_modeDropDown)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachControl=(self.ui_PNL_outliner, 'right', 2, self.ui_LAY_outlinerToolbar)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_PNL_outliner, 'bottom', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_PNL_outliner, 'left', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_LAY_outlinerToolbar, 'top', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_LAY_outlinerToolbar, 'right', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_LAY_outlinerToolbar, 'bottom', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachNone=(self.ui_LAY_outlinerToolbar, 'left')) # - - - - - - - - - - - - - - - - - self.ui_LAY_attachFrame = m.frameLayout(marginHeight=2, marginWidth=2, borderVisible=False, labelVisible=False) self.ui_QT_TBL_searchResult = self.searchResultDlg.getResultsTable() self.searchResultModel = SearchResultModel() self.ui_searchResultTableSetProps() self.ui_QT_TBL_searchResult.setModel(self.searchResultModel) # double ui_searchResultTableSetProps cause some props need to be set # double ui_searchResultTableSetProps cause some props need to be set self.ui_searchResultTableSetProps() self.ui_QT_TBL_searchResult.connect( self.ui_QT_TBL_searchResult.selectionModel(), QtCore.SIGNAL('selectionChanged(QItemSelection, QItemSelection)'), self.ui_QT_TBL_searchResult_selectionChanges) # - - - - - - - - - - - - - - - - - m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_searchRow, 'top', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_searchRow, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachNone=(self.ui_LAY_searchRow, 'bottom')) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_searchRow, 'left', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachControl=(self.ui_SEP_searchSeparator, 'top', 2, self.ui_LAY_searchRow)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_SEP_searchSeparator, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachNone=(self.ui_SEP_searchSeparator, 'bottom')) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_SEP_searchSeparator, 'left', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachControl=(self.ui_LAY_outlinerForm, 'top', 2, self.ui_SEP_searchSeparator)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_outlinerForm, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_outlinerForm, 'bottom', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_outlinerForm, 'left', 2)) # - - - - - - - - - - - - - - - - - m.showWindow(self.window) # - - - - - - - - - - - - - - - - - self.prefSaver = prefsaver.PrefSaver( serializers.SerializerOptVar(OPT_VAR_NAME)) self.prefSaver.addControl(self.searchResultDlg, prefsaver.UIType.PYSIDEWindow, (200, 200, 500, 700)) self.prefSaver.addVariable('fx_outliner_state', self.prefsPack, self.prefsUnPack, None) self.prefsLoad() self.ui_update() m.setFocus(self.ui_LAY_outlinerForm)
import maya.cmds as cmds # check the dock existing if cmds.dockControl("dockOutliner", q=True, exists=True): cmds.deleteUI("dockOutliner") cmds.window('dockOutl') cmds.frameLayout(labelVisible=False) panel = cmds.outlinerPanel() outliner = cmds.outlinerPanel(panel, query=True, outlinerEditor=True) cmds.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showReferenceNodes=True, showReferenceMembers=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False,
## clean / delete all attribute renderman\n import maya.cmds as mc selectionList = mc.ls(\"*Shape*\") for item in selectionList: if mc.objExists(item + \".rmanCCs\"): mc.deleteAttr( item + \".rmanCCs\") attributList = mc.listAttr(item, string=\"*rman*\") if attributList: for itemAttr in attributList: mc.deleteAttr( item + \".\" + itemAttr )" # Create a new regular outliner in its own window mc.window(title="Outliner", toolbox=True) mc.frameLayout( labelVisible=False, width=300, height=500 ) panel = mc.outlinerPanel(tearOff=False) outliner = mc.outlinerPanel(panel, query=True, outlinerEditor=True) myOutliner = mc.outlinerEditor( outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showReferenceNodes=False, showReferenceMembers=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showNamespace=True, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') myOutliner = mc.outlinerPanel(tearOff=True, outlinerEditor=False) print ">> ", myOutliner print mc.outlinerPanel(myOutliner, parent=True, q=True) ## mc.select("c_*") selectionList = mc.ls(sl=True, type="transform") mc.select(selectionList) if selectionList: for item in selectionList: #nc = item.split("|")
import maya.cmds as mc # Create a new regular outliner in its own window mc.window(title="Outliner", toolbox=True) mc.frameLayout(labelVisible=False, width=300, height=500) panel = mc.outlinerPanel() outliner = mc.outlinerPanel(panel, query=True, outlinerEditor=True) mc.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showReferenceNodes=False, showReferenceMembers=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showNamespace=True, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') mc.showWindow()
def UI(): # check the dock existing if cmds.dockControl("tTDock", q=True, exists=True): cmds.deleteUI("tTDock") # create window if cmds.window('takToolWin', exists=True): cmds.deleteUI('takToolWin') cmds.window('takToolWin', title='Tak Tools', menuBar=True, mnb=False, mxb=False) # Menu cmds.menu('fileMenu', label='File', p='takToolWin') cmds.menuItem(label='Save Tools', c=saveTools, p='fileMenu') cmds.menu('editMenu', label='Edit', p='takToolWin') cmds.menuItem(label='Add Tool', c=addToolUi, p='editMenu') cmds.paneLayout('mainPaneLo', configuration='horizontal2', paneSize=[(2, 63, 37)]) cmds.formLayout('mainFormLo', p='mainPaneLo') # Common Tools section Start cmds.tabLayout('cmnToolTabLo', tv=False, p='mainFormLo') cmds.shelfLayout('Common', h=(36.5 * 4), parent='cmnToolTabLo') cmds.shelfButton(annotation='History', width=35, height=35, imageOverlayLabel='Hist', image1='menuIconEdit.png', command='DeleteHistory', sourceType='mel') # Common Tools Section End cmds.separator('mainSep', h=10, style='in', p='mainFormLo') # task tools section # # create tab cmds.tabLayout('taskTabLo', p='mainFormLo') riggingTab = cmds.formLayout('RiggingFormLo', w=21 * 21, p='taskTabLo') aniTab = cmds.formLayout('AnimationFormLo', w=21 * 21, p='taskTabLo') modelTab = cmds.formLayout('ModelingFormLo', w=21 * 21, p='taskTabLo') miscTab = cmds.formLayout('MiscFormLo', w=21 * 21, p='taskTabLo') cmds.tabLayout('taskTabLo', e=True, tabLabel=[(riggingTab, 'Rigging'), (aniTab, 'Animation'), (modelTab, 'Modeling'), (miscTab, 'Misc')]) # Editing main layout cmds.formLayout('mainFormLo', e=True, attachForm=[('cmnToolTabLo', 'top', 0), ('cmnToolTabLo', 'left', 0), ('cmnToolTabLo', 'right', 0), ('mainSep', 'left', 0), ('mainSep', 'right', 0), ('taskTabLo', 'left', 0), ('taskTabLo', 'right', 0), ('taskTabLo', 'bottom', 0)], attachControl=[('mainSep', 'top', 5, 'cmnToolTabLo'), ('taskTabLo', 'top', 5, 'mainSep')]) # rigging tab cmds.scrollLayout('riggingScrLo', childResizable=True, p='RiggingFormLo') cmds.formLayout('RiggingFormLo', e=True, attachForm=[('riggingScrLo', 'top', 0), ('riggingScrLo', 'bottom', 0), ('riggingScrLo', 'left', 0), ('riggingScrLo', 'right', 0)]) cmds.frameLayout('riggingDisplayFrameLo', label='Display', collapse=False, collapsable=True, p='riggingScrLo') # Rigging_Display Shelf Start cmds.shelfLayout('Rigging_Display', h=(41 * 1), p='riggingDisplayFrameLo') cmds.shelfButton(annotation='', width=35, height=35, imageOverlayLabel='Hist', image1='menuIconEdit.png', command='DeleteHistory', sourceType='mel') # Rigging_Display Shelf End cmds.frameLayout('riggingEditMdlFrameLo', label='Edit Model', collapse=False, collapsable=True, p='riggingScrLo') cmds.shelfLayout('Rigging_Edit_Model', h=(38 * 2), p='riggingEditMdlFrameLo') cmds.shelfButton(annotation='', width=35, height=35, imageOverlayLabel='Hist', image1='menuIconEdit.png', command='DeleteHistory', sourceType='mel') cmds.frameLayout('riggingBuildFrameLo', label='Build', collapse=False, collapsable=True, p='riggingScrLo') cmds.shelfLayout('Rigging_Build', h=(36.5 * 5), p='riggingBuildFrameLo') cmds.shelfButton(annotation='', width=35, height=35, imageOverlayLabel='Hist', image1='menuIconEdit.png', command='DeleteHistory', sourceType='mel') cmds.frameLayout('riggingSkinFrameLo', label='Skin Weights', collapse=False, collapsable=True, p='riggingScrLo') cmds.shelfLayout('Rigging_Skin_Weights', h=(40 * 2), p='riggingSkinFrameLo') cmds.frameLayout('riggingExtraFrameLo', label='Extra Tools', collapse=False, collapsable=True, p='riggingScrLo') cmds.shelfLayout('Rigging_Extra_Tools', h=(40 * 2), p='riggingExtraFrameLo') # animation tab cmds.scrollLayout('aniScrLo', childResizable=True, p='AnimationFormLo') cmds.formLayout('AnimationFormLo', e=True, attachForm=[('aniScrLo', 'top', 0), ('aniScrLo', 'bottom', 0), ('aniScrLo', 'left', 0), ('aniScrLo', 'right', 0)]) cmds.frameLayout('aniCtrlSelFrameLo', label='Control Select', collapse=False, collapsable=True, p='aniScrLo') cmds.shelfLayout('Animation_Control_Select', h=41, p='aniCtrlSelFrameLo') cmds.frameLayout('aniDisplayFrameLo', label='Display', collapse=False, collapsable=True, p='aniScrLo') cmds.shelfLayout('Animation_Display', h=41, p='aniDisplayFrameLo') cmds.frameLayout('aniCrvFrameLo', label='Animation Curve', collapse=False, collapsable=True, p='aniScrLo') cmds.shelfLayout('Animation_Animation_Curve', h=41, p='aniCrvFrameLo') cmds.frameLayout('aniPoseFrameLo', label='Pose', collapse=False, collapsable=True, p='aniScrLo') cmds.shelfLayout('Animation_Pose', h=41, p='aniPoseFrameLo') cmds.frameLayout('aniRefineShapeFrameLo', label='Refine Shape', collapse=False, collapsable=True, p='aniScrLo') cmds.shelfLayout('Animation_Refine_Shape', h=41, p='aniRefineShapeFrameLo') cmds.frameLayout('aniExtraFrameLo', label='Extra Tools', collapse=False, collapsable=True, p='aniScrLo') cmds.shelfLayout('Animation_Extra_Tools', h=41, p='aniExtraFrameLo') # modeling tab cmds.scrollLayout('mdlScrLo', childResizable=True, p='ModelingFormLo') cmds.formLayout('ModelingFormLo', e=True, attachForm=[('mdlScrLo', 'top', 0), ('mdlScrLo', 'bottom', 0), ('mdlScrLo', 'left', 0), ('mdlScrLo', 'right', 0)]) cmds.frameLayout('mdlDisplayFrameLo', label='Display', collapse=False, collapsable=True, p='mdlScrLo') cmds.shelfLayout('Modeling_Display', h=(41 * 1), p='mdlDisplayFrameLo') cmds.frameLayout('mdlSelFrameLo', label='Selection', collapse=False, collapsable=True, p='mdlScrLo') cmds.shelfLayout('Modeling_Selection', h=41, p='mdlSelFrameLo') cmds.frameLayout('mdlEditCpntFrameLo', label='Edit Component', collapse=False, collapsable=True, p='mdlScrLo') cmds.shelfLayout('Modeling_Edit_Component', h=(38 * 2), p='mdlEditCpntFrameLo') cmds.frameLayout('mdlEditGeoFrameLo', label='Edit Mesh', collapse=False, collapsable=True, p='mdlScrLo') cmds.shelfLayout('Modeling_Edit_Mesh', h=(38 * 3), p='mdlEditGeoFrameLo') cmds.frameLayout('mdlMatFrameLo', label='Material', collapse=False, collapsable=True, p='mdlScrLo') cmds.shelfLayout('Modeling_Material', h=41, p='mdlMatFrameLo') cmds.frameLayout('mdlAppFrameLo', label='Extra Tools', collapse=False, collapsable=True, p='mdlScrLo') cmds.shelfLayout('Modeling_Extra_Tools', h=(38 * 2), p='mdlAppFrameLo') # misc tab cmds.scrollLayout('miscScrLo', childResizable=True, p='MiscFormLo') cmds.formLayout('MiscFormLo', e=True, attachForm=[('miscScrLo', 'top', 0), ('miscScrLo', 'bottom', 0), ('miscScrLo', 'left', 0), ('miscScrLo', 'right', 0)]) cmds.frameLayout('miscFrameLo', label='Misc', collapsable=True, p='miscScrLo') cmds.shelfLayout('Misc_Misc', h=(41 * 2), p='miscFrameLo') cmds.frameLayout('tempFrameLo', label='Temp', collapsable=True, p='miscScrLo') cmds.shelfLayout('Misc_Temp', h=(41 * 2), p='tempFrameLo') # Ouliner cmds.frameLayout('olFrameLo', labelVisible=False, p='mainPaneLo') panel = cmds.outlinerPanel() outliner = cmds.outlinerPanel(panel, query=True, outlinerEditor=True) cmds.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showReferenceNodes=True, showReferenceMembers=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') # make dockable allowedAreas = ['right', 'left'] cmds.dockControl('tTDock', label="Tak Tools", area='left', content='takToolWin', allowedArea=allowedAreas)
def outLine(): cmds.frameLayout( lv=0) oPanel = cmds.outlinerPanel() outliner = cmds.outlinerPanel(oPanel, query=True,outlinerEditor=True, rp=mPanel) '''
def ui_createUI(self): if m.window(UI_WIN_NAME, exists=True): if m.window(UI_WIN_NAME, q=True, visible=True): return else: m.deleteUI(UI_WIN_NAME, window=True) self.window = m.window( UI_WIN_NAME, title=UI_WIN_TITLE, maximizeButton=False, ) m.scriptJob(event=['deleteAll', self.scriptJobDeleteAll], parent=self.window, protected=True) self.delUIScriptJobID = m.scriptJob(uiDeleted=[self.window, self.ui_onDeleteMainWin], protected=True) self.ui_LAY_mainForm = m.formLayout() # - - - - - - - - - - - - - - - - - self.ui_LAY_searchRow = m.rowLayout( numberOfColumns=8, adjustableColumn=2 ) self.ui_BTN_miscOperations = m.symbolButton( image=ICON_POPUP_MENU, width=22, height=22 ) self.loadUserCommandsFromXML() self.ui_POP_miscOperations = m.popupMenu(button=1) for command in self.userMenu: m.menuItem( parent=self.ui_POP_miscOperations, label=command[0], command=ft.partial(self.evalMelCommand, command[1]) ) m.menuItem(divider=True) m.menuItem( parent=self.ui_POP_miscOperations, label='Open FX Outliner Configuration File', command=ft.partial(self.openFileInEditor, XML_OUTLINER_CFG_FILE) ) m.menuItem( parent=self.ui_POP_miscOperations, label='Open FX Outliner User Menu Configuration File', command=ft.partial(self.openFileInEditor, XML_USER_MENU_FILE) ) m.menuItem(divider=True) m.menuItem( parent=self.ui_POP_miscOperations, label='Help', command=ft.partial(self.openFileInEditor, README_FILE) ) m.setParent(self.ui_LAY_searchRow) self.ui_TFD_search = m.textField( enterCommand=self.ui_BTN_searchClick, alwaysInvokeEnterCommandOnReturn=True ) self.ui_BTN_search = m.symbolButton( image=ICON_SEARCH, width=22, height=22, annotation='Perform Search', command=self.ui_BTN_searchClick ) self.ui_BTN_searchCase = m.symbolCheckBox( image=ICON_CASE_SENSITIVE, width=22, height=22, annotation='Search: Case Sensitive', changeCommand=self.ui_BTN_searchCaseChange ) self.ui_BTN_searchRegEx = m.symbolCheckBox( image=ICON_REGEX, width=22, height=22, annotation='Search: Regular Expression', changeCommand=self.ui_BTN_searchRegExChange ) self.ui_BTN_searchType = m.symbolCheckBox( image=ICON_TYPE_SEARCH, width=22, height=22, annotation='Search: Search for Type', changeCommand=self.ui_BTN_searchTypeChange ) self.ui_BTN_searchSelect = m.symbolCheckBox( image=ICON_SELECT_FOUND, width=22, height=22, annotation='Search: Select Result', changeCommand=self.ui_BTN_searchSelectChange ) self.ui_BTN_searchShape = m.symbolCheckBox( image=ICON_SHAPE, width=22, height=22, annotation='Search: Include Shapes in Search', changeCommand=self.ui_BTN_searchShapeChange ) # - - - - - - - - - - - - - - - - - m.setParent(self.ui_LAY_mainForm) self.ui_SEP_searchSeparator = m.separator(style='in', height=6) # - - - - - - - - - - - - - - - - - self.ui_LAY_outlinerForm = m.formLayout() self.ui_BTN_modeDropDown = m.button( height=24 ) # - - - - - - - - - - - - - - - - - self.generateOutlinerViews() self.ui_POP_mode = m.popupMenu(button=1) for viewCfg in self.state.outlinerViews: m.menuItem( parent=self.ui_POP_mode, label=viewCfg.name, command=ft.partial(self.ui_POP_mode_onClick, viewCfg) ) lastPrebuildViewIndex = len(self.state.outlinerViews) self.loadOutlinerViewsFromXML() m.menuItem( parent=self.ui_POP_mode, divider=True, ) for i in range(lastPrebuildViewIndex, len(self.state.outlinerViews)): vc = self.state.outlinerViews[i] m.menuItem( parent=self.ui_POP_mode, label=vc.name, command=ft.partial(self.ui_POP_mode_onClick, vc) ) # - - - - - - - - - - - - - - - - - m.setParent(self.ui_LAY_outlinerForm) fxOutlinerPanels = [x for x in m.getPanel(type='outlinerPanel') if m.outlinerPanel(x, q=True, label=True) == OUTLINER_PANEL ] if fxOutlinerPanels: self.ui_PNL_outliner = fxOutlinerPanels[0] m.outlinerPanel(self.ui_PNL_outliner, e=True, unParent=True) m.outlinerPanel(self.ui_PNL_outliner, e=True, parent=self.ui_LAY_outlinerForm) else: self.ui_PNL_outliner = m.outlinerPanel( menuBarVisible=False, label=OUTLINER_PANEL ) self.ui_EDT_outliner = m.outlinerPanel( self.ui_PNL_outliner, query=True, outlinerEditor=True, ) # - - - - - - - - - - - - - - - - - m.setParent(self.ui_LAY_outlinerForm) self.ui_LAY_outlinerToolbar = m.columnLayout() self.ui_BTN_showShapes = m.symbolCheckBox( image=ICON_SHOW_SHAPES, height=35, width=35, changeCommand=self.ui_BTN_showShapesChange, annotation='Show Shapes' ) self.ui_BTN_showSetMembers = m.symbolCheckBox( image=ICON_SHOW_SET_MEMBERS, height=35, width=35, changeCommand=self.ui_BTN_showSetMembersChange, annotation='Show Set Members' ) self.ui_BTN_selectSetMembers = m.symbolCheckBox( image=ICON_SELECT_SET_MEMBERS, height=35, width=35, changeCommand=self.ui_BTN_selectSetMembersChange, annotation='Select Set Members \ Assigned Objects' ) # - - - - - - - - - - - - - - - - - m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_BTN_modeDropDown, 'top', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachControl=(self.ui_BTN_modeDropDown, 'right', 2, self.ui_LAY_outlinerToolbar)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachNone=(self.ui_BTN_modeDropDown, 'bottom')) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_BTN_modeDropDown, 'left', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachControl=(self.ui_PNL_outliner, 'top', 2, self.ui_BTN_modeDropDown)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachControl=(self.ui_PNL_outliner, 'right', 2, self.ui_LAY_outlinerToolbar)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_PNL_outliner, 'bottom', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_PNL_outliner, 'left', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_LAY_outlinerToolbar, 'top', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_LAY_outlinerToolbar, 'right', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachForm=(self.ui_LAY_outlinerToolbar, 'bottom', 2)) m.formLayout(self.ui_LAY_outlinerForm, e=True, attachNone=(self.ui_LAY_outlinerToolbar, 'left')) # - - - - - - - - - - - - - - - - - self.ui_LAY_attachFrame = m.frameLayout( marginHeight=2, marginWidth=2, borderVisible=False, labelVisible=False ) self.ui_QT_TBL_searchResult = self.searchResultDlg.getResultsTable() self.searchResultModel = SearchResultModel() self.ui_searchResultTableSetProps() self.ui_QT_TBL_searchResult.setModel(self.searchResultModel) # double ui_searchResultTableSetProps cause some props need to be set # double ui_searchResultTableSetProps cause some props need to be set self.ui_searchResultTableSetProps() self.ui_QT_TBL_searchResult.connect( self.ui_QT_TBL_searchResult.selectionModel(), QtCore.SIGNAL('selectionChanged(QItemSelection, QItemSelection)'), self.ui_QT_TBL_searchResult_selectionChanges ) # - - - - - - - - - - - - - - - - - m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_searchRow, 'top', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_searchRow, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachNone=(self.ui_LAY_searchRow, 'bottom')) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_searchRow, 'left', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachControl=(self.ui_SEP_searchSeparator, 'top', 2, self.ui_LAY_searchRow)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_SEP_searchSeparator, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachNone=(self.ui_SEP_searchSeparator, 'bottom')) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_SEP_searchSeparator, 'left', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachControl=(self.ui_LAY_outlinerForm, 'top', 2, self.ui_SEP_searchSeparator)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_outlinerForm, 'right', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_outlinerForm, 'bottom', 2)) m.formLayout(self.ui_LAY_mainForm, e=True, attachForm=(self.ui_LAY_outlinerForm, 'left', 2)) # - - - - - - - - - - - - - - - - - m.showWindow(self.window) # - - - - - - - - - - - - - - - - - self.prefSaver = prefsaver.PrefSaver(serializers.SerializerOptVar(OPT_VAR_NAME)) self.prefSaver.addControl(self.searchResultDlg, prefsaver.UIType.PYSIDEWindow, (200, 200, 500, 700)) self.prefSaver.addVariable('fx_outliner_state', self.prefsPack, self.prefsUnPack, None) self.prefsLoad() self.ui_update() m.setFocus(self.ui_LAY_outlinerForm)
def buildObjectTree(self): panel = mc.outlinerPanel(menuBarVisible=False) outliner = mc.outlinerPanel(panel, query=True, outlinerEditor=True) mc.outlinerEditor( outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, filter= self.lightType )
def script(self): #------------------------------------------------------------------------------- # PANEL LAYOUT VERTICAL #------------------------------------------------------------------------------- verticalPanel = cmds.paneLayout(configuration='horizontal2') #--------------------------- # Tabs #--------------------------- cmds.tabLayout("edToolsTabs") self.edArnoldLayout() # Arnold Tab self.edCssLayout() # CSS Tab self.edFixLayout() # FIX Tab cmds.setParent("..") # Tabs cmds.tabLayout("edToolsTabs", edit=True, tabLabel=["edArnoldLayout", 'Arnold']) cmds.tabLayout("edToolsTabs", edit=True, tabLabel=["edCssLayout", 'CSS']) cmds.tabLayout("edToolsTabs", edit=True, tabLabel=["edFixLayout", 'Fixing']) #--------------------------- # Outliner #--------------------------- outlinerPanel = cmds.outlinerPanel() outliner = cmds.outlinerPanel(outlinerPanel, query=True, outlinerEditor=True) cmds.outlinerEditor(outliner, edit=True, mainListConnection='worldList', selectionConnection='modelList', showShapes=False, showAttributes=False, showConnected=False, showAnimCurvesOnly=False, autoExpand=False, showDagOnly=True, ignoreDagHierarchy=False, expandConnections=False, showCompounds=True, showNumericAttrsOnly=False, highlightActive=True, autoSelectNewObjects=False, doNotSelectNewObjects=False, transmitFilters=False, showSetMembers=True, setFilter='defaultSetFilter') cmds.setParent("..") # outlinerPanel cmds.setParent("..") # panelVertical