Action Operators¶
- bpy.ops.action.clean(threshold=0.001, channels=False)¶
Simplify F-Curves by removing closely spaced keyframes
- Parameters
threshold (float in [0, inf], (optional)) – Threshold
channels (boolean, (optional)) – Channels
- bpy.ops.action.clickselect(wait_to_deselect_others=False, mouse_x=0, mouse_y=0, extend=False, deselect_all=False, column=False, channel=False)¶
Select keyframes by clicking on them
- Parameters
wait_to_deselect_others (boolean, (optional)) – Wait to Deselect Others
mouse_x (int in [-inf, inf], (optional)) – Mouse X
mouse_y (int in [-inf, inf], (optional)) – Mouse Y
extend (boolean, (optional)) – Extend Select, Toggle keyframe selection instead of leaving newly selected keyframes only
deselect_all (boolean, (optional)) – Deselect On Nothing, Deselect all when nothing under the cursor
column (boolean, (optional)) – Column Select, Select all keyframes that occur on the same frame as the one under the mouse
channel (boolean, (optional)) – Only Channel, Select all the keyframes in the channel under the mouse
- bpy.ops.action.copy()¶
Copy selected keyframes to the copy/paste buffer
- bpy.ops.action.delete(confirm=True)¶
Remove all selected keyframes
- Parameters
confirm (boolean, (optional)) – Confirm, Prompt for confirmation
- bpy.ops.action.duplicate()¶
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
- Parameters
ACTION_OT_duplicate (
ACTION_OT_duplicate, (optional)) – Duplicate Keyframes, Make a copy of all selected keyframesTRANSFORM_OT_transform (
TRANSFORM_OT_transform, (optional)) – Transform, Transform selected items by mode type
- bpy.ops.action.easing_type(type='AUTO')¶
Set easing type for the F-Curve segments starting from the selected keyframes
- Parameters
type (enum in ['AUTO', 'EASE_IN', 'EASE_OUT', 'EASE_IN_OUT'], (optional)) –
Type
AUTOAutomatic Easing, Easing type is chosen automatically based on what the type of interpolation used (e.g. Ease In for transitional types, and Ease Out for dynamic effects).EASE_INEase In, Only on the end closest to the next keyframe.EASE_OUTEase Out, Only on the end closest to the first keyframe.EASE_IN_OUTEase In and Out, Segment between both keyframes.
- bpy.ops.action.extrapolation_type(type='CONSTANT')¶
Set extrapolation mode for selected F-Curves
- Parameters
type (enum in ['CONSTANT', 'LINEAR', 'MAKE_CYCLIC', 'CLEAR_CYCLIC'], (optional)) –
Type
CONSTANTConstant Extrapolation, Values on endpoint keyframes are held.LINEARLinear Extrapolation, Straight-line slope of end segments are extended past the endpoint keyframes.MAKE_CYCLICMake Cyclic (F-Modifier), Add Cycles F-Modifier if one doesn’t exist already.CLEAR_CYCLICClear Cyclic (F-Modifier), Remove Cycles F-Modifier if not needed anymore.
- bpy.ops.action.frame_jump()¶
Set the current frame to the average frame value of selected keyframes
- bpy.ops.action.handle_type(type='FREE')¶
Set type of handle for selected keyframes
- Parameters
type (enum in ['FREE', 'ALIGNED', 'VECTOR', 'AUTO', 'AUTO_CLAMPED'], (optional)) –
Type
FREEFree, Completely independent manually set handle.ALIGNEDAligned, Manually set handle with rotation locked together with its pair.VECTORVector, Automatic handles that create straight lines.AUTOAutomatic, Automatic handles that create smooth curves.AUTO_CLAMPEDAuto Clamped, Automatic handles that create smooth curves which only change direction at keyframes.
- bpy.ops.action.interpolation_type(type='CONSTANT')¶
Set interpolation mode for the F-Curve segments starting from the selected keyframes
- Parameters
type (enum in ['CONSTANT', 'LINEAR', 'BEZIER', 'SINE', 'QUAD', 'CUBIC', 'QUART', 'QUINT', 'EXPO', 'CIRC', 'BACK', 'BOUNCE', 'ELASTIC'], (optional)) –
Type
CONSTANTConstant, No interpolation, value of A gets held until B is encountered.LINEARLinear, Straight-line interpolation between A and B (i.e. no ease in/out).BEZIERBezier, Smooth interpolation between A and B, with some control over curve shape.SINESinusoidal, Sinusoidal easing (weakest, almost linear but with a slight curvature).QUADQuadratic, Quadratic easing.CUBICCubic, Cubic easing.QUARTQuartic, Quartic easing.QUINTQuintic, Quintic easing.EXPOExponential, Exponential easing (dramatic).CIRCCircular, Circular easing (strongest and most dynamic).BACKBack, Cubic easing with overshoot and settle.BOUNCEBounce, Exponentially decaying parabolic bounce, like when objects collide.ELASTICElastic, Exponentially decaying sine wave, like an elastic band.
- bpy.ops.action.keyframe_insert(type='ALL')¶
Insert keyframes for the specified channels
- Parameters
type (enum in ['ALL', 'SEL', 'GROUP'], (optional)) – Type
- bpy.ops.action.keyframe_type(type='KEYFRAME')¶
Set type of keyframe for the selected keyframes
- Parameters
type (enum in ['KEYFRAME', 'BREAKDOWN', 'MOVING_HOLD', 'EXTREME', 'JITTER'], (optional)) –
Type
KEYFRAMEKeyframe, Normal keyframe, e.g. for key poses.BREAKDOWNBreakdown, A breakdown pose, e.g. for transitions between key poses.MOVING_HOLDMoving Hold, A keyframe that is part of a moving hold.EXTREMEExtreme, An “extreme” pose, or some other purpose as needed.JITTERJitter, A filler or baked keyframe for keying on ones, or some other purpose as needed.
- bpy.ops.action.layer_next()¶
Switch to editing action in animation layer above the current action in the NLA Stack
- bpy.ops.action.layer_prev()¶
Switch to editing action in animation layer below the current action in the NLA Stack
- bpy.ops.action.markers_make_local()¶
Move selected scene markers to the active Action as local ‘pose’ markers
- bpy.ops.action.mirror(type='CFRA')¶
Flip selected keyframes over the selected mirror line
- Parameters
type (enum in ['CFRA', 'XAXIS', 'MARKER'], (optional)) –
Type
CFRABy Times Over Current Frame, Flip times of selected keyframes using the current frame as the mirror line.XAXISBy Values Over Zero Value, Flip values of selected keyframes (i.e. negative values become positive, and vice versa).MARKERBy Times Over First Selected Marker, Flip times of selected keyframes using the first selected marker as the reference point.
- bpy.ops.action.new()¶
Create new action
- bpy.ops.action.paste(offset='START', merge='MIX', flipped=False)¶
Paste keyframes from copy/paste buffer for the selected channels, starting on the current frame
- Parameters
offset (enum in ['START', 'END', 'RELATIVE', 'NONE'], (optional)) –
Offset, Paste time offset of keys
STARTFrame Start, Paste keys starting at current frame.ENDFrame End, Paste keys ending at current frame.RELATIVEFrame Relative, Paste keys relative to the current frame when copying.NONENo 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
MIXMix, Overlay existing with new keys.OVER_ALLOverwrite All, Replace all keys.OVER_RANGEOverwrite Range, Overwrite keys in pasted range.OVER_RANGE_ALLOverwrite Entire Range, Overwrite keys in pasted range, using the range of all copied keys.
flipped (boolean, (optional)) – Flipped, Paste keyframes from mirrored bones if they exist
- bpy.ops.action.previewrange_set()¶
Set Preview Range based on extents of selected Keyframes
- bpy.ops.action.push_down()¶
Push action down on to the NLA stack as a new strip
- bpy.ops.action.sample()¶
Add keyframes on every frame between the selected keyframes
- bpy.ops.action.select_all(action='TOGGLE')¶
Toggle selection of all keyframes
- Parameters
action (enum in ['TOGGLE', 'SELECT', 'DESELECT', 'INVERT'], (optional)) –
Action, Selection action to execute
TOGGLEToggle, Toggle selection for all elements.SELECTSelect, Select all elements.DESELECTDeselect, Deselect all elements.INVERTInvert, Invert selection of all elements.
- bpy.ops.action.select_box(axis_range=False, xmin=0, xmax=0, ymin=0, ymax=0, wait_for_input=True, mode='SET', tweak=False)¶
Select all keyframes within the specified region
- Parameters
axis_range (boolean, (optional)) – Axis Range
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
wait_for_input (boolean, (optional)) – Wait for Input
mode (enum in ['SET', 'ADD', 'SUB'], (optional)) –
Mode
SETSet, Set a new selection.ADDExtend, Extend existing selection.SUBSubtract, Subtract existing selection.
tweak (boolean, (optional)) – Tweak, Operator has been activated using a tweak event
- bpy.ops.action.select_circle(x=0, y=0, radius=25, wait_for_input=True, mode='SET')¶
Select keyframe points using circle selection
- Parameters
x (int in [-inf, inf], (optional)) – X
y (int in [-inf, inf], (optional)) – Y
radius (int in [1, inf], (optional)) – Radius
wait_for_input (boolean, (optional)) – Wait for Input
mode (enum in ['SET', 'ADD', 'SUB'], (optional)) –
Mode
SETSet, Set a new selection.ADDExtend, Extend existing selection.SUBSubtract, Subtract existing selection.
- bpy.ops.action.select_column(mode='KEYS')¶
Select all keyframes on the specified frame(s)
- Parameters
mode (enum in ['KEYS', 'CFRA', 'MARKERS_COLUMN', 'MARKERS_BETWEEN'], (optional)) – Mode
- bpy.ops.action.select_lasso(path=None, mode='SET')¶
Select keyframe points using lasso selection
- Parameters
path (
bpy_prop_collectionofOperatorMousePath, (optional)) – Pathmode (enum in ['SET', 'ADD', 'SUB'], (optional)) –
Mode
SETSet, Set a new selection.ADDExtend, Extend existing selection.SUBSubtract, Subtract existing selection.
- bpy.ops.action.select_leftright(mode='CHECK', extend=False)¶
Select keyframes to the left or the right of the current frame
- Parameters
mode (enum in ['CHECK', 'LEFT', 'RIGHT'], (optional)) – Mode
extend (boolean, (optional)) – Extend Select
- bpy.ops.action.select_less()¶
Deselect keyframes on ends of selection islands
- bpy.ops.action.select_linked()¶
Select keyframes occurring in the same F-Curves as selected ones
- bpy.ops.action.select_more()¶
Select keyframes beside already selected ones
- bpy.ops.action.snap(type='CFRA')¶
Snap selected keyframes to the times specified
- Parameters
type (enum in ['CFRA', 'NEAREST_FRAME', 'NEAREST_SECOND', 'NEAREST_MARKER'], (optional)) –
Type
CFRASelection to Current Frame, Snap selected keyframes to the current frame.NEAREST_FRAMESelection to Nearest Frame, Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe offsets).NEAREST_SECONDSelection to Nearest Second, Snap selected keyframes to the nearest second.NEAREST_MARKERSelection to Nearest Marker, Snap selected keyframes to the nearest marker.
- bpy.ops.action.stash(create_new=True)¶
Store this action in the NLA stack as a non-contributing strip for later use
- Parameters
create_new (boolean, (optional)) – Create New Action, Create a new action once the existing one has been safely stored
- bpy.ops.action.stash_and_create()¶
Store this action in the NLA stack as a non-contributing strip for later use, and create a new action
- bpy.ops.action.unlink(force_delete=False)¶
Unlink this action from the active action slot (and/or exit Tweak Mode)
- Parameters
force_delete (boolean, (optional)) – Force Delete, Clear Fake User and remove copy stashed in this data-block’s NLA stack
- bpy.ops.action.view_all()¶
Reset viewable area to show full keyframe range
- bpy.ops.action.view_frame()¶
Move the view to the current frame
- bpy.ops.action.view_selected()¶
Reset viewable area to show selected keyframes range