0
$\begingroup$

I have all this elements that are going down on the animation I would like to automate the all the keys one after another so that they follow a standard of creating the elements one after the another: enter image description here

There´s any kind wihout using some addon?

enter image description here

$\endgroup$
1
$\begingroup$

I've written this script to shift all the keyframes at once.

  1. Select the objects
  2. Open the script in the Text Edit
  3. Set the amount of frames, eg: step(10)
  4. Run script (Alt + P)

import bpy

def shift(step):
    interval = 0.0
    for object in bpy.context.selected_objects:
        interval += step
        if object.animation_data !=  None:
            fcurves = object.animation_data.action.fcurves
            for curve in fcurves:
                keyframepoints = curve.keyframe_points
                for point in keyframepoints:
                    point.co.x += interval 
                    point.handle_left.x += interval
                    point.handle_right.x += interval


shift(10)

The script will loop through the fcurves of the selected objects and will increment the x value of each point.

Caveat:

  1. the script doesn't allow to set the order of the objects.
  2. the script will shift ALL the keyframes

enter image description here

$\endgroup$
  • $\begingroup$ Damn m8 wIth all respect! your devilish! $\endgroup$ – andrepazleal Oct 5 '18 at 16:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.