QFX LABMADE UP. MADE REAL. Send a brief

HOME / TRICKS[N° T03] · UPDATED 2026-11-19

Slow a whole Blender animation down in one function (Blender 5 actions)

Scale every key and handle around the first frame. Blender 5 moved F-curves into layered actions, so the old action.fcurves loop quietly finds nothing.

BlenderPythonAnimation4 MIN READ

BY · PUBLISHED

The first cut of QX-Core played its whole choreography in 4 seconds, which felt rushed. Re-keying dozens of objects by hand would take an afternoon. Scaling the time axis of every key takes a few lines.

Find the F-curves in Blender 5

Blender 5 uses layered actions: an action holds layers, a layer holds strips, a strip holds channel bags, and the F-curves live there. Scripts that loop over action.fcurves run without errors and change nothing. This helper handles both layouts:

ITER_ACTION_FCURVES
def iter_action_fcurves(action):
    if hasattr(action, "layers") and len(action.layers) > 0:
        for layer in action.layers:
            for strip in layer.strips:
                for bag in strip.channelbags:
                    yield from bag.fcurves
    elif hasattr(action, "fcurves"):        # Blender 4.x and older
        yield from action.fcurves

Scale keys and handles together

RETIME_ALL_ACTIONS
def retime_all_actions(factor=2.0, pivot=1.0):
    for action in bpy.data.actions:
        for fc in iter_action_fcurves(action):
            for kp in fc.keyframe_points:
                for attr in ("co", "handle_left", "handle_right"):
                    v = getattr(kp, attr)
                    v.x = pivot + (v.x - pivot) * factor
            fc.update()

retime_all_actions(2.0)
scene.frame_end = 192          # 4 s -> 8 s at 24 fps
  • Scale the handles too, or the easing curves get squashed into the old timing and moves look snappy at the ends.
  • Call fc.update() so Blender re-sorts keys and recalculates auto handles.
  • Anything baked from the animation (simulation caches, exported anchor positions) has to be baked again afterwards.
++++
QFX-BRIEF · ASYNC INTAKEWRITTEN · NO CALLS

Want something like this built for your product?

Send a short brief by email: the product, where the video or game will run, and when you need it. I reply in writing within a day with an approach and a quote for that project.

[email protected] · REPLY WITHIN 1 WORKING DAY