Пример #1
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()
Пример #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
 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
    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.")