예제 #1
0
    def ctrlSystem(self, ctrl):

        if (self.ctrls[ctrl][0]):
            cmds.select(self.ctrls[ctrl][0], r=True)
            if (self.ctrls[ctrl][1] == "rotate"):
                cmds.RotateTool()
            elif (self.ctrls[ctrl][1] == "trans"):
                cmds.MoveTool()
        else:
            print("Nothing setup.")
예제 #2
0
def controlSelect(obj, manip=None):
	
	selectMode = cmds.symbolCheckBox( localBtn, q=True, value=True)
	
	if( manip == "rot" ):
		# rotate tool
		cmds.RotateTool()
	elif( manip == "trans" ):
		# move tool
		cmds.MoveTool()
	
	if( selectMode ):
		cmds.select( obj, add=True )
	else:
		cmds.select( obj, r=True )
예제 #3
0
    def ctrlSystem(self, ctrl):
        if (cmds.menuItem(self.testMode, q=True, checkBox=True)):
            if (self.ctrls[ctrl][0]):
                cmds.select(self.ctrls[ctrl][0], r=True)
                if (self.ctrls[ctrl][1] == "rotate"):
                    cmds.RotateTool()
                elif (self.ctrls[ctrl][1] == "trans"):
                    cmds.MoveTool()
            else:
                print("Nothing setup.")

        else:
            selected = cmds.ls(sl=True)
            self.ctrls[ctrl][0] = selected
        print("Control: %s Set-> %s" % (ctrl, (",".join(self.ctrls[ctrl][0]))))
예제 #4
0
    def selectCtrl(self, ctrl, switchMode=None, addMode=False):
        '''
		Selects the control icons.
		'''
        prefSwitch = True

        # Prefered switch
        if (prefSwitch and switchMode):
            # Switch to the proper mode
            if (switchMode.lower() == "rotate"):
                cmds.RotateTool()
            else:
                cmds.MoveTool()

            print("Switching to %s." % switchMode)

            if (addMode):
                cmds.select(ctrl, add=True)
            else:
                cmds.select(ctrl, replace=True)