Action Operators


Simplify F-Curves by removing closely spaced keyframes

Parameters:threshold (float in [0, inf], (optional)) – Threshold
bpy.ops.action.clickselect(extend=False, column=False)

Select keyframes by clicking on them

  • extend (boolean, (optional)) – Extend Select
  • column (boolean, (optional)) – Column Select

Copy selected keyframes to the copy/paste buffer


Remove all selected keyframes


Make a copy of all selected keyframes

bpy.ops.action.duplicate_move(ACTION_OT_duplicate=None, TRANSFORM_OT_transform=None)

Make a copy of all selected keyframes and move them

  • ACTION_OT_duplicate (ACTION_OT_duplicate, (optional)) – Duplicate Keyframes, Make a copy of all selected keyframes
  • TRANSFORM_OT_transform (TRANSFORM_OT_transform, (optional)) – Transform, Transform selected items by mode type

Set extrapolation mode for selected F-Curves

Parameters:type (enum in [‘CONSTANT’, ‘LINEAR’, ‘MAKE_CYCLIC’, ‘CLEAR_CYCLIC’], (optional)) –


  • CONSTANT Constant Extrapolation, Values on endpoint keyframes are held.
  • LINEAR Linear Extrapolation, Straight-line slope of end segments are extended past the endpoint keyframes.
  • MAKE_CYCLIC Make Cyclic (F-Modifier), Add Cycles F-Modifier if one doesn’t exist already.
  • CLEAR_CYCLIC Clear Cyclic (F-Modifier), Remove Cycles F-Modifier if not needed anymore.

Set the current frame to the average frame value of selected keyframes


Set type of handle for selected keyframes

Parameters:type (enum in [‘FREE’, ‘VECTOR’, ‘ALIGNED’, ‘AUTO’, ‘AUTO_CLAMPED’], (optional)) –


  • FREE Free.
  • VECTOR Vector.
  • ALIGNED Aligned.
  • AUTO Automatic.
  • AUTO_CLAMPED Auto Clamped, Auto handles clamped to not overshoot.

Set interpolation mode for the F-Curve segments starting from the selected keyframes

Parameters:type (enum in [‘CONSTANT’, ‘LINEAR’, ‘BEZIER’], (optional)) –


  • CONSTANT Constant, No interpolation, value of A gets held until B is encountered.
  • LINEAR Linear, Straight-line interpolation between A and B (i.e. no ease in/out).
  • BEZIER Bezier, Smooth interpolation between A and B, with some control over curve shape.

Insert keyframes for the specified channels

Parameters:type (enum in [‘ALL’, ‘SEL’, ‘GROUP’], (optional)) – Type

Set type of keyframe for the selected keyframes

Parameters:type (enum in [‘KEYFRAME’, ‘BREAKDOWN’, ‘EXTREME’, ‘JITTER’], (optional)) – Type

Move selected scene markers to the active Action as local ‘pose’ markers


Flip selected keyframes over the selected mirror line

Parameters:type (enum in [‘CFRA’, ‘XAXIS’, ‘MARKER’], (optional)) –


  • CFRA By Times over Current frame, Flip times of selected keyframes using the current frame as the mirror line.
  • XAXIS By Values over Value=0, Flip values of selected keyframes (i.e. negative values become positive, and vice versa).
  • MARKER By Times over First Selected Marker, Flip times of selected keyframes using the first selected marker as the reference point.

Create new action

bpy.ops.action.paste(offset='START', merge='MIX')

Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame

  • offset (enum in [‘START’, ‘END’, ‘RELATIVE’, ‘NONE’], (optional)) –

    Offset, Paste time offset of keys

    • START Frame Start, Paste keys starting at current frame.
    • END Frame End, Paste keys ending at current frame.
    • RELATIVE Frame Relative, Paste keys relative to the current frame when copying.
    • NONE No Offset, Paste keys from original time.
  • merge (enum in [‘MIX’, ‘OVER_ALL’, ‘OVER_RANGE’, ‘OVER_RANGE_ALL’], (optional)) –

    Type, Method of merging pasted keys and existing

    • MIX Mix, Overlay existing with new keys.
    • OVER_ALL Overwrite All, Replace all keys.
    • OVER_RANGE Overwrite Range, Overwrite keys in pasted range.
    • OVER_RANGE_ALL Overwrite Entire Range, Overwrite keys in pasted range, using the range of all copied keys.

Set Preview Range based on extents of selected Keyframes


Add keyframes on every frame between the selected keyframes


Toggle selection of all keyframes

Parameters:invert (boolean, (optional)) – Invert
bpy.ops.action.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True, axis_range=False)

Select all keyframes within the specified region

  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
  • xmin (int in [-inf, inf], (optional)) – X Min
  • xmax (int in [-inf, inf], (optional)) – X Max
  • ymin (int in [-inf, inf], (optional)) – Y Min
  • ymax (int in [-inf, inf], (optional)) – Y Max
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
  • axis_range (boolean, (optional)) – Axis Range

Select all keyframes on the specified frame(s)

Parameters:mode (enum in [‘KEYS’, ‘CFRA’, ‘MARKERS_COLUMN’, ‘MARKERS_BETWEEN’], (optional)) – Mode
bpy.ops.action.select_leftright(mode='CHECK', extend=False)

Select keyframes to the left or the right of the current frame

  • mode (enum in [‘CHECK’, ‘LEFT’, ‘RIGHT’], (optional)) – Mode
  • extend (boolean, (optional)) – Extend Select

Deselect keyframes on ends of selection islands


Select keyframes occurring in the same F-Curves as selected ones


Select keyframes beside already selected ones


Snap selected keyframes to the times specified

Parameters:type (enum in [‘CFRA’, ‘NEAREST_FRAME’, ‘NEAREST_SECOND’, ‘NEAREST_MARKER’], (optional)) –


  • CFRA Current frame, Snap selected keyframes to the current frame.
  • NEAREST_FRAME Nearest Frame, Snap selected keyframes to the nearest (whole) frame (use to fix accidental sub-frame offsets).
  • NEAREST_SECOND Nearest Second, Snap selected keyframes to the nearest second.
  • NEAREST_MARKER Nearest Marker, Snap selected keyframes to the nearest marker.

Reset viewable area to show full keyframe range


Reset viewable area to show selected keyframes range

Previous topic

Operators (bpy.ops)

Next topic

Anim Operators