def closeAll(self): leafItems = self.getTreeLeafItems() for i in range(len(leafItems)): sToolFileName = leafItems[i].text(2) sToolName = leafItems[i].text(0) sType = main.getPyFileType(sToolFileName) if sType == "tool": bOpened = utils.isToolOpened(sToolName) if bOpened: isDockable = utils.isToolDockable(sToolName) utils.closeTool(sToolName, dock=isDockable) else: utils.closeTool(sToolName) # leafItems[i].setBackground(1, QtGui.QBrush(self.openStateColor)) leafItems[i].setIcon(1, self.toolIcon) leafItems[i].setForeground(1, QtGui.QBrush(self.foregroundColor)) leafItems[i].setText(1, "Open")
def treeItemExecution(self, item, column): if item.childCount() == 0: sToolName = item.text(0) sToolFileName = item.text(2) sType = main.getPyFileType(sToolFileName) # oModule = utils.importModule(sToolName) importStatement = main.getPyFileFullImportName(sToolFileName) print sToolFileName oModule = importlib.import_module(importStatement) # If the module can be run or closed if sType == "tool": bOpened = utils.isToolOpened(sToolName) # run or close the tool if bOpened: isDockable = utils.isToolDockable(sToolName) utils.closeTool(sToolName, dock=isDockable) else: utils.openTool(sToolName, module=oModule) # if the module is a tool the Open/Close label must be updated bOpened = utils.isToolOpened(sToolName) if bOpened: # item.setBackground(1, QtGui.QBrush(self.closeStateColor)) item.setForeground(1, QtGui.QBrush(self.closeStateColor)) item.setIcon(1, self.toolOpenIcon) item.setText(1, "Close") else: # item.setBackground(1, QtGui.QBrush(self.openStateColor)) item.setForeground(1, QtGui.QBrush(self.foregroundColor)) item.setIcon(1, self.toolIcon) item.setText(1, "Open") elif sType == "script": utils.executeScript(sToolName, module=oModule)
def projectionManagerRun(): utils.closeTool('projectionManager') dTool = ProjectionManager()
def bakeACPdynamicsRun(): utils.closeTool('bakeACPdynamics') dTool = BakeACPdynamics()
def nodesetManagerRun(): utils.closeTool('nodesetManager') dTool = NodesetManager()
def renamerRun(): utils.closeTool('renamer') dTool = Renamer()
def playblastToGIFRun(): utils.closeTool('playblastToGIF') dTool = PlayblastToGIF()
def channelBoxRun(): utils.closeTool('channelBox') ChannelBox()
def passManagerRun(): utils.closeTool('passManager', dock=True) dTool = PassManager()
def templateToolDockClose(): utils.closeTool('templateToolDock', dock=True)
def templateToolDockRun(): utils.closeTool('templateToolDock', dock=True) dTool = TemplateToolDock()
def rigManagerClose(): """Closes the tool.""" utils.closeTool('rigManager', dock=True)
def rigManagerRun(): """Runs the tool.""" utils.closeTool('rigManager', dock=True) dTool = RigManager()
def VideoPlayerClose(): utils.closeTool('VideoPlayer')
def VideoPlayerRun(): utils.closeTool('VideoPlayer') dTool = VideoPlayer()
def templateToolStdRun(): utils.closeTool('templateToolStd') dTool = TemplateToolStd()
def templateToolStdClose(): utils.closeTool('templateToolStd')
def passManagerClose(): utils.closeTool('passManager', dock=True)
def channelBoxClose(): utils.closeTool('channelBox')
def nodeEditorRun(): utils.closeTool('nodeEditor') NodeEditor()
def playblastToGIFClose(): utils.closeTool('playblastToGIF')
def nodeEditorClose(): utils.closeTool('nodeEditor')
def renamerClose(): utils.closeTool('renamer')
def templateToolStdUIRun(): utils.closeTool('templateToolStdUI') TemplateToolStdUI()
def nodesetManagerClose(): utils.closeTool('nodesetManager')
def templateToolStdUIClose(): utils.closeTool('templateToolStdUI')
def bakeACPdynamicsClose(): utils.closeTool('bakeACPdynamics')
def installToolCageToUserRun(): utils.closeTool('installToolCageToUser') dTool = InstallToolCageToUser()
def projectionManagerClose(): utils.closeTool('projectionManager')
def installToolCageToUserClose(): utils.closeTool('installToolCageToUser')