Example #1
0
 def clear(self, *args):
     
     
     if cmds.iconTextButton("TempCustomPivotBtn", query=True, exists=True):
         cmds.iconTextButton("TempCustomPivotBtn", edit=True, image= uiMod.getImagePath("specialTools_create_temp_custom_pivot"),         highlightImage= uiMod.getImagePath("specialTools_create_temp_custom_pivot copy"))
            
     cmds.refresh(suspend=True)
     
     currFrame = cmds.currentTime(query=True) 
     
     loadConstraints = aToolsMod.loadInfoWithScene(self.STORE_NODE, self.CONSTRAINTS)
     loadLocators    = aToolsMod.loadInfoWithScene(self.STORE_NODE, self.LOCATORS)
     loadCtrls       = aToolsMod.loadInfoWithScene(self.STORE_NODE, self.CTRLS)
     currentFrame    = aToolsMod.loadInfoWithScene(self.STORE_NODE, self.CURRENTFRAME)
     
     #exit edit mode
     
     if cmds.currentCtx() not in self.deniedCtx: cmds.setToolTo(cmds.currentCtx())
     
     
     if currentFrame:
         cmds.currentTime(eval(currentFrame))
     
     #get values
     """
     translation = []
     rotation    = []
     if loadCtrls: 
         ctrlObjs    = eval(loadCtrls)
         for loopCtrl in ctrlObjs:
             translation.append(cmds.xform(loopCtrl, query=True, ws=True, rotatePivot=True))
             rotation.append(cmds.xform(loopCtrl, query=True, ws=True, rotation=True))
     """        
     
     
     if loadConstraints: 
         constraintObjs = eval(loadConstraints)
         for loopConstraint in constraintObjs:
             if cmds.objExists(loopConstraint): cmds.delete(loopConstraint)
             
     if loadCtrls and loadLocators: 
         locatorObjs = eval(loadLocators)
         ctrlObjs    = eval(loadCtrls)
         for n, loopCtrl in enumerate(ctrlObjs):
             if cmds.objExists(loopCtrl) and cmds.objExists(locatorObjs[n]):
                 G.aToolsBar.align.align([loopCtrl], locatorObjs[n]) 
     
         for loopLocator in locatorObjs:
             if cmds.objExists(loopLocator): cmds.delete(loopLocator)
     
     cmds.currentTime(currFrame)    
     cmds.refresh(suspend=False)
Example #2
0
 def loadTwistObjsInfo(self):  
     loadInfo = aToolsMod.loadInfoWithScene(self.STORE_NODE, self.MOTION_TRAIL_ATTR)
     if loadInfo: 
         self.twistIkObjs = eval(loadInfo)
         # set ik twist back to 1
         self.reenableTwistObjs()
         aToolsMod.saveInfoWithScene(self.STORE_NODE, self.MOTION_TRAIL_ATTR, []) 
Example #3
0
 def loadTwistObjsInfo(self):
     loadInfo = aToolsMod.loadInfoWithScene(self.STORE_NODE,
                                            self.MOTION_TRAIL_ATTR)
     if loadInfo:
         self.twistIkObjs = eval(loadInfo)
         # set ik twist back to 1
         self.reenableTwistObjs()
         aToolsMod.saveInfoWithScene(self.STORE_NODE,
                                     self.MOTION_TRAIL_ATTR, [])
Example #4
0
def getShotCamera():
    STORE_NODE = "tUtilities"
    CAMERA_ATTR = "cameraSelected"

    shotCamera = aToolsMod.loadInfoWithScene(STORE_NODE, CAMERA_ATTR)

    if not shotCamera:
        cameras = utilMod.getAllCameras()
        if cameras:
            aToolsMod.saveInfoWithScene(STORE_NODE, CAMERA_ATTR, cameras[0])
            return cameras[0]

    return shotCamera
Example #5
0
def getShotCamera():
    STORE_NODE      = "tUtilities"
    CAMERA_ATTR     = "cameraSelected" 
    
    shotCamera      = aToolsMod.loadInfoWithScene(STORE_NODE, CAMERA_ATTR)

    if not shotCamera:
        cameras = utilMod.getAllCameras()
        if cameras:
            aToolsMod.saveInfoWithScene(STORE_NODE, CAMERA_ATTR, cameras[0])
            return cameras[0]
        
    return shotCamera
Example #6
0
 def getTimelineRanges(self):
     return aToolsMod.loadInfoWithScene(STORE_NODE, RANGE_ATTR)
Example #7
0
 def getTimelineRanges(self):
     return aToolsMod.loadInfoWithScene(STORE_NODE, RANGE_ATTR)