Esempio n. 1
0
	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")
Esempio n. 2
0
	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)
Esempio n. 3
0
def projectionManagerRun():
	utils.closeTool('projectionManager')
	dTool = ProjectionManager()
Esempio n. 4
0
def bakeACPdynamicsRun():
	utils.closeTool('bakeACPdynamics')
	dTool = BakeACPdynamics()
Esempio n. 5
0
def nodesetManagerRun():
	utils.closeTool('nodesetManager')
	dTool = NodesetManager()
Esempio n. 6
0
def renamerRun():
	utils.closeTool('renamer')
	dTool = Renamer()
Esempio n. 7
0
def playblastToGIFRun():
	utils.closeTool('playblastToGIF')
	dTool = PlayblastToGIF()
Esempio n. 8
0
def channelBoxRun():
    utils.closeTool('channelBox')
    ChannelBox()
Esempio n. 9
0
def passManagerRun():
	utils.closeTool('passManager', dock=True)
	dTool = PassManager()
Esempio n. 10
0
def templateToolDockClose():
	utils.closeTool('templateToolDock', dock=True)
Esempio n. 11
0
def templateToolDockRun():
	utils.closeTool('templateToolDock', dock=True)
	dTool = TemplateToolDock()
Esempio n. 12
0
def rigManagerClose():
    """Closes the tool."""
    utils.closeTool('rigManager', dock=True)
Esempio n. 13
0
def rigManagerRun():
    """Runs the tool."""

    utils.closeTool('rigManager', dock=True)
    dTool = RigManager()
Esempio n. 14
0
def VideoPlayerClose():
    utils.closeTool('VideoPlayer')
Esempio n. 15
0
def VideoPlayerRun():
    utils.closeTool('VideoPlayer')
    dTool = VideoPlayer()
Esempio n. 16
0
def templateToolStdRun():
    utils.closeTool('templateToolStd')
    dTool = TemplateToolStd()
Esempio n. 17
0
def templateToolStdClose():
    utils.closeTool('templateToolStd')
Esempio n. 18
0
def passManagerClose():
	utils.closeTool('passManager', dock=True)
Esempio n. 19
0
def channelBoxClose():
    utils.closeTool('channelBox')
Esempio n. 20
0
def nodeEditorRun():
    utils.closeTool('nodeEditor')
    NodeEditor()
Esempio n. 21
0
def playblastToGIFClose():
	utils.closeTool('playblastToGIF')
Esempio n. 22
0
def nodeEditorClose():
    utils.closeTool('nodeEditor')
Esempio n. 23
0
def renamerClose():
	utils.closeTool('renamer')
Esempio n. 24
0
def templateToolStdUIRun():
    utils.closeTool('templateToolStdUI')
    TemplateToolStdUI()
Esempio n. 25
0
def nodesetManagerClose():
	utils.closeTool('nodesetManager')
Esempio n. 26
0
def templateToolStdUIClose():
    utils.closeTool('templateToolStdUI')
Esempio n. 27
0
def bakeACPdynamicsClose():
	utils.closeTool('bakeACPdynamics')
Esempio n. 28
0
def installToolCageToUserRun():
	utils.closeTool('installToolCageToUser')
	dTool = InstallToolCageToUser()
Esempio n. 29
0
def projectionManagerClose():
	utils.closeTool('projectionManager')
Esempio n. 30
0
def installToolCageToUserClose():
	utils.closeTool('installToolCageToUser')