コード例 #1
0
ファイル: tUtilities.py プロジェクト: Italic-/maya-prefs
 def setTimelineRange(self, range=None, *args):  
        
     rangeVisible            = cmds.timeControl( G.playBackSliderPython, query=True, rangeVisible=True )
     
     if not rangeVisible and not range:
         range = [cmds.playbackOptions(query=True, minTime=True), cmds.playbackOptions(query=True, maxTime=True)+1]
     
     if range or rangeVisible:
   
         if not range: range = animMod.getTimelineRange(float=False)
         rFrom   = range[0]
         rTo     = range[1]-1
         
         cmds.playbackOptions(minTime=rFrom, maxTime=rTo)
         
         
         if self.getTimelineRanges() != None: 
             ranges = eval(self.getTimelineRanges()) 
         else: 
             ranges = []
         if not range in ranges:
             ranges.append(range)     
             aToolsMod.saveInfoWithScene(STORE_NODE, RANGE_ATTR, ranges) 
             
     
     utilMod.deselectTimelineRange()
コード例 #2
0
    def setTimelineRange(self, range=None, *args):

        rangeVisible = cmds.timeControl(G.playBackSliderPython,
                                        query=True,
                                        rangeVisible=True)

        if not rangeVisible and not range:
            range = [
                cmds.playbackOptions(query=True, minTime=True),
                cmds.playbackOptions(query=True, maxTime=True) + 1
            ]

        if range or rangeVisible:

            if not range: range = animMod.getTimelineRange(float=False)
            rFrom = range[0]
            rTo = range[1] - 1

            cmds.playbackOptions(minTime=rFrom, maxTime=rTo)

            if self.getTimelineRanges() != None:
                ranges = eval(self.getTimelineRanges())
            else:
                ranges = []
            if not range in ranges:
                ranges.append(range)
                aToolsMod.saveInfoWithScene(STORE_NODE, RANGE_ATTR, ranges)

        utilMod.deselectTimelineRange()
コード例 #3
0
ファイル: transformAll.py プロジェクト: jubeyjose/maya-prefs
 def setMode(self, onOff):
     
     self.killJobs()
                   
     if onOff: 
         
         #self.allAnimCurves = utilMod.getAllAnimCurves()   
         self.allValues = {}
         self.setRange()                  
         self.updateCurrentValues()
         utilMod.deselectTimelineRange()
         
         G.transformAllScriptJobs.append(cmds.scriptJob(runOnce = False, killWithScene = False, event =('timeChanged', self.updateCurrentValues )))
         G.transformAllScriptJobs.append(cmds.scriptJob(runOnce = False, killWithScene = False, event =('SelectionChanged', self.updateCurrentValues )))
         
         self.warn()
         
 
     else:
         cmds.warning("Transform All is OFF.")  
コード例 #4
0
ファイル: transformAll.py プロジェクト: Italic-/maya-prefs
    def setMode(self, onOff):

        self.killJobs()

        if onOff:

            # self.allAnimCurves = utilMod.getAllAnimCurves()
            self.allValues = {}
            self.setRange()
            self.updateCurrentValues()
            utilMod.deselectTimelineRange()

            G.transformAllScriptJobs.append(
                cmds.scriptJob(runOnce=False, killWithScene=False, event=("timeChanged", self.updateCurrentValues))
            )
            G.transformAllScriptJobs.append(
                cmds.scriptJob(runOnce=False, killWithScene=False, event=("SelectionChanged", self.updateCurrentValues))
            )

            self.warn()

        else:
            cmds.warning("Transform All is OFF.")