Esempio n. 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()
Esempio n. 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()
Esempio n. 3
0
    def doPlayblast(self, camera):
        
        G.TU_movie              = None
        G.TU_audioFile          = None
        G.TU_audioOffsetSec     = None        
        winName                 = 'playblastWindow'
        overscan                = cmds.getAttr("%s.overscan"%camera)   
        audioTrack              = cmds.timeControl(G.playBackSliderPython, query=True, sound=True)
        rangeVisible            = cmds.timeControl(G.playBackSliderPython, query=True, rangeVisible=True )  
        widthHeight             = utilMod.getRenderResolution()  
        
        if cmds.window(winName, query=True, exists=True): cmds.deleteUI(winName)
        
        window                  = cmds.window(winName, widthHeight=widthHeight)
        form                    = cmds.formLayout()
        editor                  = cmds.modelEditor()
        column                  = cmds.columnLayout('true')
        
        cmds.formLayout( form, edit=True, attachForm=[(column, 'top', 0), (column, 'left', 0), (editor, 'top', 0), (editor, 'bottom', 0), (editor, 'right', 0)], attachNone=[(column, 'bottom'), (column, 'right')], attachControl=(editor, 'left', 0, column))
        cmds.modelEditor(editor, edit=True, camera=camera, activeView=True)
        cmds.showWindow( window )
        cmds.window( winName, edit=True, topLeftCorner=(0, 0), widthHeight=[200,200])        
        utilMod.cameraViewMode(editor)        
        cmds.setAttr("%s.overscan"%camera, 1)
        
        
        if rangeVisible:
            range = animMod.getTimelineRange(float=False)
            rFrom   = range[0]
            rTo     = range[1]-1
        else:
            rFrom = cmds.playbackOptions(query=True, minTime=True)
            rTo   = cmds.playbackOptions(query=True, maxTime=True)
        

        if G.currentStudio == None:
            G.TU_movie = cmds.playblast(format="qt", sound=audioTrack, startTime=rFrom ,endTime=rTo , viewer=1, showOrnaments=0, offScreen=True, fp=4, percent=50, compression="png", quality=70, widthHeight=widthHeight, clearCache=True)
            
        else:
            
            fps             = mel.eval("currentTimeUnitToFPS") 
            if audioTrack:
                G.TU_audioFile      = cmds.sound(audioTrack, query=True, file=True)
                audioOffset         = cmds.sound(audioTrack, query=True, offset=True)
                G.TU_audioOffsetSec = str((rFrom - audioOffset)/-fps)
                
            movieName       = cmds.playblast(format="image", startTime=rFrom ,endTime=rTo , viewer=0, showOrnaments=0, offScreen=True, fp=4, percent=50, compression="jpg", quality=70, widthHeight=widthHeight, clearCache=True)
            if movieName: 
                G.TU_movie           = "%s.%s-%s#.jpg"%(movieName.split(".")[0], int(rFrom), int(rTo))
                if audioTrack:  G.TU_audioOffsetSec = audioOffset
                self.playMovie(G.TU_movie, G.TU_audioFile, G.TU_audioOffsetSec)
            
        if cmds.window(winName, query=True, exists=True): cmds.deleteUI(winName)
        
        cmds.setAttr("%s.overscan"%camera, overscan)
        
        if not G.TU_movie: return
        save = aToolsMod.getUserPref("saveAfterPlayblasting", default=True)
        if save and not rangeVisible: cmds.file(save=True)
Esempio n. 4
0
def cropTimelineAnimation():

    getCurves = animMod.getAnimCurves()
    animCurves = getCurves[0]
    getFrom = getCurves[1]
    range = animMod.getTimelineRange()

    if animCurves:
        keyTimes = animMod.getTarget("keyTimes", animCurves, getFrom)

        for n, aCurve in enumerate(animCurves):

            firstKey = keyTimes[n][0]
            lastKey = keyTimes[n][-1]

            if range[0] >= firstKey:
                cmds.cutKey(aCurve, time=(firstKey, range[0] - 1), clear=True)

            if range[1] <= lastKey:
                cmds.cutKey(aCurve, time=(range[1], lastKey), clear=True)
Esempio n. 5
0
def cropTimelineAnimation():
    
    getCurves  = animMod.getAnimCurves()
    animCurves = getCurves[0]
    getFrom    = getCurves[1] 
    range      = animMod.getTimelineRange()  
        
    if animCurves:        
        keyTimes            = animMod.getTarget("keyTimes", animCurves, getFrom)
    
        for n, aCurve in enumerate(animCurves):
            
            firstKey = keyTimes[n][0]
            lastKey = keyTimes[n][-1]
            
           
            if range[0] >= firstKey: 
                cmds.cutKey(aCurve, time=(firstKey, range[0]-1), clear=True)
                
            if range[1] <= lastKey: 
                cmds.cutKey(aCurve, time=(range[1], lastKey), clear=True)        
Esempio n. 6
0
    def applyMirror(self, pasteAndCycle=False):

        cmds.waitCursor(state=True)

        range = animMod.getTimelineRange()
        range[1] = int(range[1])
        total = range[1] - range[0]

        getCurves = animMod.getAnimCurves()
        animCurves = getCurves[0]
        getFrom = getCurves[1]

        invertRules = self.getInvertRules()

        if animCurves:
            status = "aTools - Applying mirror..."
            utilMod.startProgressBar(status)
            totalSteps = len(animCurves)
            firstStep = 0
            thisStep = 0
            estimatedTime = None
            startChrono = None

            mirrorCurves = animMod.getMirrorObjs(animCurves)
            keyValues = animMod.getTarget("keyValues", animCurves, getFrom)
            keyTimes = animMod.getTarget("keyTimes", animCurves, getFrom)
            currValues = animMod.getTarget("currValues", animCurves, getFrom)
            keysIndexSel = animMod.getTarget("keysIndexSel", animCurves,
                                             getFrom)
            keyTangentsAngle = animMod.getTarget("keyTangentsAngle",
                                                 animCurves, getFrom)
            keyTangentsType = animMod.getTarget("keyTangentsType", animCurves,
                                                getFrom)
            currTime = cmds.currentTime(query=True)

            if keysIndexSel:

                #create dummy key
                #objects     = animMod.getObjsSel()
                #mirrorObjs  = animMod.getMirrorObjs(objects)
                #animMod.createDummyKey(mirrorObjs)

                for thisStep, aCurve in enumerate(animCurves):

                    startChrono = utilMod.chronoStart(startChrono, firstStep,
                                                      thisStep, totalSteps,
                                                      estimatedTime, status)

                    mCurve = mirrorCurves[thisStep]
                    isCenterCurve = (mCurve == None)
                    mirrorInvertValue = self.mirrorInvert(
                        aCurve, isCenterCurve, invertRules)
                    if mCurve and cmds.objExists(mCurve):
                        tCurve = mCurve
                    else:
                        tCurve = aCurve

                    if not cmds.objExists(tCurve): continue

                    animMod.createDummyKey([tCurve])

                    if len(keysIndexSel[thisStep]) > 0:
                        #delete keys
                        cmds.cutKey(
                            tCurve,
                            time=(
                                keyTimes[thisStep][keysIndexSel[thisStep][0]],
                                keyTimes[thisStep][keysIndexSel[thisStep][-1]]
                            ),
                            clear=True)

                        for key in keysIndexSel[thisStep]:
                            keyValue = keyValues[thisStep][
                                key] * mirrorInvertValue
                            inTangAngleValue = keyTangentsAngle[thisStep][key][
                                0] * mirrorInvertValue
                            outTangAngleValue = keyTangentsAngle[thisStep][
                                key][1] * mirrorInvertValue

                            #apply keys
                            if pasteAndCycle:
                                t = keyTimes[thisStep][key] + (total / 2.)

                                if t == range[1]:
                                    #repeat key at first frame
                                    t1 = t - total
                                    time = (t1, t1)
                                    cmds.setKeyframe(tCurve,
                                                     time=time,
                                                     value=keyValue)
                                    cmds.keyTangent(tCurve,
                                                    time=time,
                                                    inAngle=inTangAngleValue,
                                                    outAngle=outTangAngleValue)
                                    cmds.keyTangent(
                                        tCurve,
                                        time=time,
                                        inTangentType=keyTangentsType[thisStep]
                                        [key][0],
                                        outTangentType=keyTangentsType[
                                            thisStep][key][1])

                                elif t > range[1]:
                                    #fist half
                                    t -= total

                                time = (t, t)

                            else:
                                time = (keyTimes[thisStep][key],
                                        keyTimes[thisStep][key])

                            cmds.setKeyframe(tCurve, time=time, value=keyValue)
                            cmds.keyTangent(tCurve,
                                            time=time,
                                            inAngle=inTangAngleValue,
                                            outAngle=outTangAngleValue)
                            cmds.keyTangent(
                                tCurve,
                                time=time,
                                inTangentType=keyTangentsType[thisStep][key]
                                [0],
                                outTangentType=keyTangentsType[thisStep][key]
                                [1])
                    else:  #no keys#invert translate x
                        keyValue = currValues[thisStep] * mirrorInvertValue

                        #apply keys
                        cmds.setKeyframe(tCurve,
                                         time=(currTime, currTime),
                                         value=keyValue)

                    animMod.deleteDummyKey([tCurve])

                    estimatedTime = utilMod.chronoEnd(startChrono, firstStep,
                                                      thisStep, totalSteps)

                #delete dummy key
                #animMod.deleteDummyKey(mirrorObjs)

            self.selectMirrorObjs(False)
            utilMod.setProgressBar(endProgress=True)

        animMod.refresh()
        cmds.waitCursor(state=False)
Esempio n. 7
0
 def applyMirror(self, pasteAndCycle=False):
 
     cmds.waitCursor(state=True) 
     
     range       = animMod.getTimelineRange()
     range[1]    = int(range[1])
     total       = range[1]-range[0]
     
     getCurves   = animMod.getAnimCurves()
     animCurves  = getCurves[0]
     getFrom     = getCurves[1] 
     
     invertRules = self.getInvertRules()
     
     if animCurves:
         status          = "aTools - Applying mirror..."
         utilMod.startProgressBar(status)
         totalSteps      = len(animCurves)           
         firstStep       = 0
         thisStep        = 0
         estimatedTime   = None
         startChrono     = None
         
         mirrorCurves        = animMod.getMirrorObjs(animCurves)
         keyValues           = animMod.getTarget("keyValues", animCurves, getFrom)
         keyTimes            = animMod.getTarget("keyTimes", animCurves, getFrom)
         currValues          = animMod.getTarget("currValues", animCurves, getFrom)
         keysIndexSel        = animMod.getTarget("keysIndexSel", animCurves, getFrom)
         keyTangentsAngle    = animMod.getTarget("keyTangentsAngle", animCurves, getFrom)
         keyTangentsType     = animMod.getTarget("keyTangentsType", animCurves, getFrom)
         currTime            = cmds.currentTime(query=True)
         
         
         
         if keysIndexSel:
             
             #create dummy key
             #objects     = animMod.getObjsSel()
             #mirrorObjs  = animMod.getMirrorObjs(objects)
             #animMod.createDummyKey(mirrorObjs)
                             
             for thisStep, aCurve in enumerate(animCurves):
                 
                 startChrono     = utilMod.chronoStart(startChrono, firstStep, thisStep, totalSteps, estimatedTime, status)
                 
                 mCurve              = mirrorCurves[thisStep]
                 isCenterCurve       = (mCurve == None)                
                 mirrorInvertValue   = self.mirrorInvert(aCurve, isCenterCurve, invertRules)
                 if mCurve and cmds.objExists(mCurve):
                     tCurve = mCurve
                 else:
                     tCurve = aCurve
                     
                 if not cmds.objExists(tCurve): continue
                        
                 
                 animMod.createDummyKey([tCurve])
                 
                 if len(keysIndexSel[thisStep]) > 0:
                     #delete keys
                     cmds.cutKey(tCurve, time=(keyTimes[thisStep][keysIndexSel[thisStep][0]],keyTimes[thisStep][keysIndexSel[thisStep][-1]]), clear=True) 
                 
                     for key in keysIndexSel[thisStep]:
                         keyValue            = keyValues[thisStep][key] * mirrorInvertValue
                         inTangAngleValue    = keyTangentsAngle[thisStep][key][0] * mirrorInvertValue
                         outTangAngleValue   = keyTangentsAngle[thisStep][key][1] * mirrorInvertValue
                            
                         
                         #apply keys
                         if pasteAndCycle:
                             t = keyTimes[thisStep][key] + (total/2.)
                             
                             if t == range[1]:
                                 #repeat key at first frame
                                 t1 = t-total
                                 time = (t1,t1)
                                 cmds.setKeyframe(tCurve, time=time, value=keyValue)
                                 cmds.keyTangent(tCurve,  time=time, inAngle=inTangAngleValue, outAngle=outTangAngleValue)
                                 cmds.keyTangent(tCurve,  time=time, inTangentType=keyTangentsType[thisStep][key][0], outTangentType=keyTangentsType[thisStep][key][1])
                                            
                             elif t > range[1]:
                                 #fist half
                                 t -= total
                             
                             time        = (t,t)
                             
                             
                             
                         else:
                             time        = (keyTimes[thisStep][key],keyTimes[thisStep][key])
                             
                         
                             
                         cmds.setKeyframe(tCurve, time=time, value=keyValue)
                         cmds.keyTangent(tCurve,  time=time, inAngle=inTangAngleValue, outAngle=outTangAngleValue)
                         cmds.keyTangent(tCurve,  time=time, inTangentType=keyTangentsType[thisStep][key][0], outTangentType=keyTangentsType[thisStep][key][1])
                 else: #no keys#invert translate x
                     keyValue = currValues[thisStep] * mirrorInvertValue
                        
                     
                     #apply keys
                     cmds.setKeyframe(tCurve, time=(currTime,currTime), value=keyValue)
                     
                 animMod.deleteDummyKey([tCurve]) 
                 
                 estimatedTime = utilMod.chronoEnd(startChrono, firstStep, thisStep, totalSteps)        
                 
                     
             #delete dummy key
             #animMod.deleteDummyKey(mirrorObjs)
         
         self.selectMirrorObjs(False)
         utilMod.setProgressBar(endProgress=True)
                        
     animMod.refresh()
     cmds.waitCursor(state=False) 
Esempio n. 8
0
 def paste(self, type="onlyKeys"):
     
     cmds.refresh(suspend=True)        
         
     selObjects      = utilMod.getNameSpace(self.selection)[1]  
     self.locators   = []
     
     if self.targetObj != "world":
         #CREATE
         self.locatorGroup = animMod.group(name=self.locatorGroupName)   
          
         for n, loopObj in enumerate(self.sourceObjs):
             
             nameSpace       = utilMod.getNameSpace([loopObj])
             loopSelName     = "%s_%s"%(nameSpace[0][0], nameSpace[1][0]) 
             locatorName     = "fakeConstrain_%s"%loopSelName 
             
             locator = animMod.createNull(locatorName)            
             self.locators.append(locator)
             with G.aToolsBar.createAToolsNode: cmds.parent(locator, self.locatorGroup)   
            
         self.locators.append(self.locatorGroup)
     
     currFrame   = cmds.currentTime(query=True)
     getCurves   = animMod.getAnimCurves()
     animCurves  = getCurves[0]
     getFrom     = getCurves[1]         
     
     if animCurves:
         keysSel = animMod.getTarget("keysSel", animCurves, getFrom)
         keysSel = utilMod.mergeLists(keysSel)    
         if keysSel == []:
              keysSel = [currFrame]   
     else:
         keysSel = [currFrame]
     
     frames = keysSel
     
     if type == "allFrames":
         frameRange = animMod.getTimelineRange(float=False)
         frames = list(range(int(frameRange[0]),int(frameRange[1])))
         
     if self.targetObj != "world":
         G.aToolsBar.align.align([self.locatorGroup], self.targetObj, frames=frames)
                     
     for n, loopObj in enumerate(self.sourceObjs):
              
         matrix     = self.copyCache[n]         
         
         if self.targetObj != "world":
             cmds.xform(self.locators[n], matrix=matrix)
                     
             G.aToolsBar.align.align([loopObj], self.locators[n], frames=frames, showProgress=True)
             
         else:
             for loopFrame in frames:
                 cmds.currentTime(loopFrame)          
                 cmds.xform(loopObj, ws=True, matrix=matrix)
             
             cmds.currentTime(currFrame)
                     
         for loopFrame in frames:
             for loopAttr in ["translate", "rotate"]:
                 breakdown = (loopFrame not in keysSel)
                 cmds.keyframe(loopObj, edit=True, attribute=loopAttr, time=(loopFrame, loopFrame), breakdown=breakdown)
     
         
     if self.targetObj != "world":
         self.clearLocators()     
         cmds.select(self.selection) 
     
     cmds.refresh(suspend=False)
Esempio n. 9
0
    def doPlayblast(self, camera):

        G.TU_movie = None
        G.TU_audioFile = None
        G.TU_audioOffsetSec = None
        winName = 'playblastWindow'
        overscan = cmds.getAttr("%s.overscan" % camera)
        audioTrack = cmds.timeControl(G.playBackSliderPython,
                                      query=True,
                                      sound=True)
        rangeVisible = cmds.timeControl(G.playBackSliderPython,
                                        query=True,
                                        rangeVisible=True)
        widthHeight = utilMod.getRenderResolution()

        if cmds.window(winName, query=True, exists=True):
            cmds.deleteUI(winName)

        window = cmds.window(winName, widthHeight=widthHeight)
        form = cmds.formLayout()
        editor = cmds.modelEditor()
        column = cmds.columnLayout('true')

        cmds.formLayout(form,
                        edit=True,
                        attachForm=[(column, 'top', 0), (column, 'left', 0),
                                    (editor, 'top', 0), (editor, 'bottom', 0),
                                    (editor, 'right', 0)],
                        attachNone=[(column, 'bottom'), (column, 'right')],
                        attachControl=(editor, 'left', 0, column))
        cmds.modelEditor(editor, edit=True, camera=camera, activeView=True)
        cmds.showWindow(window)
        cmds.window(winName,
                    edit=True,
                    topLeftCorner=(0, 0),
                    widthHeight=[200, 200])
        utilMod.cameraViewMode(editor)
        cmds.setAttr("%s.overscan" % camera, 1)

        if rangeVisible:
            range = animMod.getTimelineRange(float=False)
            rFrom = range[0]
            rTo = range[1] - 1
        else:
            rFrom = cmds.playbackOptions(query=True, minTime=True)
            rTo = cmds.playbackOptions(query=True, maxTime=True)

        if G.currentStudio == None:
            G.TU_movie = cmds.playblast(format="qt",
                                        sound=audioTrack,
                                        startTime=rFrom,
                                        endTime=rTo,
                                        viewer=1,
                                        showOrnaments=0,
                                        offScreen=True,
                                        fp=4,
                                        percent=50,
                                        compression="png",
                                        quality=70,
                                        widthHeight=widthHeight,
                                        clearCache=True)

        else:

            fps = mel.eval("currentTimeUnitToFPS")
            if audioTrack:
                G.TU_audioFile = cmds.sound(audioTrack, query=True, file=True)
                audioOffset = cmds.sound(audioTrack, query=True, offset=True)
                G.TU_audioOffsetSec = str((rFrom - audioOffset) / -fps)

            movieName = cmds.playblast(format="image",
                                       startTime=rFrom,
                                       endTime=rTo,
                                       viewer=0,
                                       showOrnaments=0,
                                       offScreen=True,
                                       fp=4,
                                       percent=50,
                                       compression="jpg",
                                       quality=70,
                                       widthHeight=widthHeight,
                                       clearCache=True)
            if movieName:
                G.TU_movie = "%s.%s-%s#.jpg" % (movieName.split(".")[0],
                                                int(rFrom), int(rTo))
                if audioTrack: G.TU_audioOffsetSec = audioOffset
                self.playMovie(G.TU_movie, G.TU_audioFile, G.TU_audioOffsetSec)

        if cmds.window(winName, query=True, exists=True):
            cmds.deleteUI(winName)

        cmds.setAttr("%s.overscan" % camera, overscan)

        if not G.TU_movie: return
        save = aToolsMod.getUserPref("saveAfterPlayblasting", default=True)
        if save and not rangeVisible: cmds.file(save=True)
Esempio n. 10
0
    def setTangent(self, tangentType, tangentInOut="inOut", targetKeys="selected", *args):

        # utilMod.timer(mode="s", function="MAIN FUNCTION")

        cmds.waitCursor(state=True)

        """
        cmds.undoInfo(openChunk=True)
        cmds.undoInfo(closeChunk=True)
        cmds.undoInfo(openChunk=True)
        cmds.undoInfo(closeChunk=True)
        cmds.undoInfo(openChunk=True)
        cmds.undoInfo(closeChunk=True)
        cmds.undoInfo(openChunk=True)
        """

        # tangentType = flow, bounce, auto, etc
        # targetKeys = all, selected
        # tangentInOut = inOut, in, out

        # set default tangent type
        if tangentType == "flow":
            cmds.keyTangent(edit=True, g=True, inTangentType="auto", outTangentType="auto")
        elif tangentType == "step":
            cmds.keyTangent(edit=True, g=True, outTangentType=tangentType)
        elif tangentType != "bounce":
            cmds.keyTangent(edit=True, g=True, inTangentType=tangentType, outTangentType=tangentType)

        # get target curves
        getCurves = animMod.getAnimCurves()
        animCurves = getCurves[0]
        getFrom = getCurves[1]

        # if there is no curves, exit
        if animCurves:
            status = "aTools - Tangents..."
            utilMod.startProgressBar(status)
            totalSteps = len(animCurves)
            firstStep = 0
            thisStep = 0
            estimatedTime = None
            startChrono = None

            index = None
            time = None

            if targetKeys == "all":  # apply for all keys
                time = (-50000, 500000)

                if not self.isDefaultTangent(tangentType):
                    index = animMod.getTarget("keyIndexTimes", animCurves, getFrom)

                self.applyTangent(animCurves, tangentType, getFrom, time, index)

            elif targetKeys == "selected":  # apply on a range
                if getFrom == "timeline":
                    time = animMod.getTimelineRange()
                    time = (time[0], time[1])  # flow and bounce
                    if not self.isDefaultTangent(tangentType):
                        index = animMod.getTarget("keysIndexSel", animCurves, getFrom)
                    self.applyTangent(animCurves, tangentType, getFrom, time, index, tangentInOut)

                else:
                    if self.isDefaultTangent(tangentType):  # if the tangent types are default maya types
                        # apply individually on each key
                        keysSel = animMod.getTarget("keysSel", animCurves, getFrom)

                        for thisStep, aCurve in enumerate(animCurves):
                            if cmds.progressBar(G.progBar, query=True, isCancelled=True):
                                utilMod.setProgressBar(endProgress=True)
                                break
                            startChrono = utilMod.chronoStart(
                                startChrono, firstStep, thisStep, totalSteps, estimatedTime, status
                            )

                            for loopKey in keysSel[thisStep]:
                                time = (loopKey, loopKey)
                                self.applyTangent(aCurve, tangentType, getFrom, time, index, tangentInOut)

                            estimatedTime = utilMod.chronoEnd(startChrono, firstStep, thisStep, totalSteps)

                    else:  # flow and bounce
                        index = animMod.getTarget("keysIndexSel", animCurves, getFrom)
                        self.applyTangent(animCurves, tangentType, getFrom, time, index, tangentInOut)
            else:  # first and last frame
                keyTimes = animMod.getTarget("keyTimes", animCurves, getFrom)
                keyIndexTimes = animMod.getTarget("keyIndexTimes", animCurves, getFrom)

                self.bounceEnds(animCurves, tangentType, getFrom, tangentInOut, keyTimes, keyIndexTimes, targetKeys)

            utilMod.setProgressBar(endProgress=True)
        # cmds.undoInfo(closeChunk=True)

        cmds.waitCursor(state=False)