Graph Operators

bpy.ops.graph.bake()

Bake selected F-Curves to a set of sampled points defining a similar curve

bpy.ops.graph.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.graph.click_insert(frame=1.0, value=1.0, extend=False)

Insert new keyframe at the cursor position for the active F-Curve

Parameters:
  • frame (float in [-inf, inf], (optional)) – Frame Number, Frame to insert keyframe on
  • value (float in [-inf, inf], (optional)) – Value, Value for keyframe on
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
bpy.ops.graph.clickselect(extend=False, deselect_all=False, column=False, curves=False)

Select keyframes by clicking on them

Parameters:
  • 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
  • curves (boolean, (optional)) – Only Curves, Select all the keyframes in the curve
bpy.ops.graph.copy()

Copy selected keyframes to the copy/paste buffer

bpy.ops.graph.cursor_set(frame=0.0, value=0.0)

Interactively set the current frame and value cursor

Parameters:
  • frame (float in [-1.04857e+06, 1.04857e+06], (optional)) – Frame
  • value (float in [-inf, inf], (optional)) – Value
bpy.ops.graph.delete()

Remove all selected keyframes

bpy.ops.graph.driver_delete_invalid()

Delete all visible drivers considered invalid

bpy.ops.graph.driver_variables_copy()

Copy the driver variables of the active driver

bpy.ops.graph.driver_variables_paste(replace=False)

Add copied driver variables to the active driver

Parameters:replace (boolean, (optional)) – Replace Existing, Replace existing driver variables, instead of just appending to the end of the existing list
bpy.ops.graph.duplicate(mode='TRANSLATION')

Make a copy of all selected keyframes

Parameters:mode (enum in ['INIT', 'DUMMY', 'TRANSLATION', 'ROTATION', 'RESIZE', 'SKIN_RESIZE', 'TOSPHERE', 'SHEAR', 'BEND', 'SHRINKFATTEN', 'TILT', 'TRACKBALL', 'PUSHPULL', 'CREASE', 'MIRROR', 'BONE_SIZE', 'BONE_ENVELOPE', 'BONE_ENVELOPE_DIST', 'CURVE_SHRINKFATTEN', 'MASK_SHRINKFATTEN', 'GPENCIL_SHRINKFATTEN', 'BONE_ROLL', 'TIME_TRANSLATE', 'TIME_SLIDE', 'TIME_SCALE', 'TIME_EXTEND', 'BAKE_TIME', 'BWEIGHT', 'ALIGN', 'EDGESLIDE', 'SEQSLIDE', 'GPENCIL_OPACITY'], (optional)) – Mode
bpy.ops.graph.duplicate_move(GRAPH_OT_duplicate=None, TRANSFORM_OT_transform=None)

Make a copy of all selected keyframes and move them

Parameters:
  • GRAPH_OT_duplicate (GRAPH_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
bpy.ops.graph.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

  • AUTO Automatic 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_IN Ease In, Only on the end closest to the next keyframe.
  • EASE_OUT Ease Out, Only on the end closest to the first keyframe.
  • EASE_IN_OUT Ease In and Out, Segment between both keyframes.
bpy.ops.graph.euler_filter()

Fix large jumps and flips in the selected Euler Rotation F-Curves arising from rotation values being clipped when baking physics

bpy.ops.graph.extrapolation_type(type='CONSTANT')

Set extrapolation mode for selected F-Curves

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

Type

  • 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.
bpy.ops.graph.fmodifier_add(type='NULL', only_active=True)

Add F-Modifier to the active/selected F-Curves

Parameters:
  • type (enum in ['NULL', 'GENERATOR', 'FNGENERATOR', 'ENVELOPE', 'CYCLES', 'NOISE', 'LIMITS', 'STEPPED'], (optional)) –

    Type

    • NULL Invalid.
    • GENERATOR Generator, Generate a curve using a factorized or expanded polynomial.
    • FNGENERATOR Built-In Function, Generate a curve using standard math functions such as sin and cos.
    • ENVELOPE Envelope, Reshape F-Curve values - e.g. change amplitude of movements.
    • CYCLES Cycles, Cyclic extend/repeat keyframe sequence.
    • NOISE Noise, Add pseudo-random noise on top of F-Curves.
    • LIMITS Limits, Restrict maximum and minimum values of F-Curve.
    • STEPPED Stepped Interpolation, Snap values to nearest grid-step - e.g. for a stop-motion look.
  • only_active (boolean, (optional)) – Only Active, Only add F-Modifier to active F-Curve
bpy.ops.graph.fmodifier_copy()

Copy the F-Modifier(s) of the active F-Curve

bpy.ops.graph.fmodifier_paste(only_active=True, replace=False)

Add copied F-Modifiers to the selected F-Curves

Parameters:
  • only_active (boolean, (optional)) – Only Active, Only paste F-Modifiers on active F-Curve
  • replace (boolean, (optional)) – Replace Existing, Replace existing F-Modifiers, instead of just appending to the end of the existing list
bpy.ops.graph.frame_jump()

Place the cursor on the midpoint of selected keyframes

bpy.ops.graph.ghost_curves_clear()

Clear F-Curve snapshots (Ghosts) for active Graph Editor

bpy.ops.graph.ghost_curves_create()

Create snapshot (Ghosts) of selected F-Curves as background aid for active Graph Editor

bpy.ops.graph.handle_type(type='FREE')

Set type of handle for selected keyframes

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

Type

  • FREE Free, Completely independent manually set handle.
  • ALIGNED Aligned, Manually set handle with rotation locked together with its pair.
  • VECTOR Vector, Automatic handles that create straight lines.
  • AUTO Automatic, Automatic handles that create smooth curves.
  • AUTO_CLAMPED Auto Clamped, Automatic handles that create smooth curves which only change direction at keyframes.
bpy.ops.graph.hide(unselected=False)

Hide selected curves from Graph Editor view

Parameters:unselected (boolean, (optional)) – Unselected, Hide unselected rather than selected curves
bpy.ops.graph.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

  • 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.
  • SINE Sinusoidal, Sinusoidal easing (weakest, almost linear but with a slight curvature).
  • QUAD Quadratic, Quadratic easing.
  • CUBIC Cubic, Cubic easing.
  • QUART Quartic, Quartic easing.
  • QUINT Quintic, Quintic easing.
  • EXPO Exponential, Exponential easing (dramatic).
  • CIRC Circular, Circular easing (strongest and most dynamic).
  • BACK Back, Cubic easing with overshoot and settle.
  • BOUNCE Bounce, Exponentially decaying parabolic bounce, like when objects collide.
  • ELASTIC Elastic, Exponentially decaying sine wave, like an elastic band.
bpy.ops.graph.keyframe_insert(type='ALL')

Insert keyframes for the specified channels

Parameters:type (enum in ['ALL', 'SEL', 'CURSOR_ACTIVE', 'CURSOR_SEL'], (optional)) –

Type

  • ALL All Channels, Insert a keyframe on all visible and editable F-Curves using each curve’s current value.
  • SEL Only Selected Channels, Insert a keyframe on selected F-Curves using each curve’s current value.
  • CURSOR_ACTIVE Active Channels At Cursor, Insert a keyframe for the active F-Curve at the cursor point.
  • CURSOR_SEL Selected Channels At Cursor, Insert a keyframe for selected F-Curves at the cursor point.
bpy.ops.graph.mirror(type='CFRA')

Flip selected keyframes over the selected mirror line

Parameters:type (enum in ['CFRA', 'VALUE', 'YAXIS', 'XAXIS', 'MARKER'], (optional)) –

Type

  • CFRA By Times over Current Frame, Flip times of selected keyframes using the current frame as the mirror line.
  • VALUE By Values over Cursor Value, Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the mirror line.
  • YAXIS By Times over Time=0, Flip times of selected keyframes, effectively reversing the order they appear in.
  • 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.
bpy.ops.graph.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

    • 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.
  • flipped (boolean, (optional)) – Flipped, Paste keyframes from mirrored bones if they exist
bpy.ops.graph.previewrange_set()

Automatically set Preview Range based on range of keyframes

bpy.ops.graph.reveal(select=True)

Make previously hidden curves visible again in Graph Editor view

Parameters:select (boolean, (optional)) – Select
bpy.ops.graph.sample()

Add keyframes on every frame between the selected keyframes

bpy.ops.graph.select_all(action='TOGGLE')

Toggle selection of all keyframes

Parameters:action (enum in ['TOGGLE', 'SELECT', 'DESELECT', 'INVERT'], (optional)) –

Action, Selection action to execute

  • TOGGLE Toggle, Toggle selection for all elements.
  • SELECT Select, Select all elements.
  • DESELECT Deselect, Deselect all elements.
  • INVERT Invert, Invert selection of all elements.
bpy.ops.graph.select_box(axis_range=False, include_handles=False, tweak=False, xmin=0, xmax=0, ymin=0, ymax=0, wait_for_input=True, mode='SET')

Select all keyframes within the specified region

Parameters:
  • axis_range (boolean, (optional)) – Axis Range
  • include_handles (boolean, (optional)) – Include Handles, Are handles tested individually against the selection criteria
  • tweak (boolean, (optional)) – Tweak, Operator has been activated using a tweak event
  • 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

    • SET Set, Set a new selection.
    • ADD Extend, Extend existing selection.
    • SUB Subtract, Subtract existing selection.
bpy.ops.graph.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

    • SET Set, Set a new selection.
    • ADD Extend, Extend existing selection.
    • SUB Subtract, Subtract existing selection.
bpy.ops.graph.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.graph.select_lasso(path=None, mode='SET')

Select keyframe points using lasso selection

Parameters:
  • path (bpy_prop_collection of OperatorMousePath, (optional)) – Path
  • mode (enum in ['SET', 'ADD', 'SUB'], (optional)) –

    Mode

    • SET Set, Set a new selection.
    • ADD Extend, Extend existing selection.
    • SUB Subtract, Subtract existing selection.
bpy.ops.graph.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.graph.select_less()

Deselect keyframes on ends of selection islands

bpy.ops.graph.select_linked()

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

bpy.ops.graph.select_more()

Select keyframes beside already selected ones

bpy.ops.graph.smooth()

Apply weighted moving means to make selected F-Curves less bumpy

bpy.ops.graph.snap(type='CFRA')

Snap selected keyframes to the chosen times/values

Parameters:type (enum in ['CFRA', 'VALUE', 'NEAREST_FRAME', 'NEAREST_SECOND', 'NEAREST_MARKER', 'HORIZONTAL'], (optional)) –

Type

  • CFRA Current Frame, Snap selected keyframes to the current frame.
  • VALUE Cursor Value, Set values of selected keyframes to the cursor value (Y/Horizontal component).
  • 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.
  • HORIZONTAL Flatten Handles, Flatten handles for a smoother transition.
bpy.ops.graph.sound_bake(filepath="", filter_blender=False, filter_backup=False, filter_image=False, filter_movie=True, filter_python=False, filter_font=False, filter_sound=True, filter_text=False, filter_archive=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_folder=True, filter_blenlib=False, filemode=9, show_multiview=False, use_multiview=False, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA', action_type='OPENFILE', low=0.0, high=100000.0, attack=0.005, release=0.2, threshold=0.0, use_accumulate=False, use_additive=False, use_square=False, sthreshold=0.1)

Bakes a sound wave to selected F-Curves

Parameters:
  • filepath (string, (optional, never None)) – File Path, Path to file
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_backup (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_archive (boolean, (optional)) – Filter archive files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_alembic (boolean, (optional)) – Filter Alembic files
  • filter_folder (boolean, (optional)) – Filter folders
  • filter_blenlib (boolean, (optional)) – Filter Blender IDs
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
  • show_multiview (boolean, (optional)) – Enable Multi-View
  • use_multiview (boolean, (optional)) – Use Multi-View
  • display_type (enum in ['DEFAULT', 'LIST_VERTICAL', 'LIST_HORIZONTAL', 'THUMBNAIL'], (optional)) –

    Display Type

    • DEFAULT Default, Automatically determine display type for files.
    • LIST_VERTICAL Short List, Display files as short list.
    • LIST_HORIZONTAL Long List, Display files as a detailed list.
    • THUMBNAIL Thumbnails, Display files as thumbnails.
  • sort_method (enum in ['FILE_SORT_ALPHA', 'FILE_SORT_EXTENSION', 'FILE_SORT_TIME', 'FILE_SORT_SIZE'], (optional)) –

    File sorting mode

    • FILE_SORT_ALPHA Name, Sort the file list alphabetically.
    • FILE_SORT_EXTENSION Extension, Sort the file list by extension/type.
    • FILE_SORT_TIME Modified Date, Sort files by modification time.
    • FILE_SORT_SIZE Size, Sort files by size.
  • action_type (enum in ['OPENFILE', 'SAVE'], (optional)) –

    Action Type

    • OPENFILE Open, Use the file browser for opening files or a directory.
    • SAVE Save, Use the file browser for saving a file.
  • low (float in [0, 100000], (optional)) – Lowest frequency, Cutoff frequency of a high-pass filter that is applied to the audio data
  • high (float in [0, 100000], (optional)) – Highest frequency, Cutoff frequency of a low-pass filter that is applied to the audio data
  • attack (float in [0, 2], (optional)) – Attack time, Value for the hull curve calculation that tells how fast the hull curve can rise (the lower the value the steeper it can rise)
  • release (float in [0, 5], (optional)) – Release time, Value for the hull curve calculation that tells how fast the hull curve can fall (the lower the value the steeper it can fall)
  • threshold (float in [0, 1], (optional)) – Threshold, Minimum amplitude value needed to influence the hull curve
  • use_accumulate (boolean, (optional)) – Accumulate, Only the positive differences of the hull curve amplitudes are summarized to produce the output
  • use_additive (boolean, (optional)) – Additive, The amplitudes of the hull curve are summarized (or, when Accumulate is enabled, both positive and negative differences are accumulated)
  • use_square (boolean, (optional)) – Square, The output is a square curve (negative values always result in -1, and positive ones in 1)
  • sthreshold (float in [0, 1], (optional)) – Square Threshold, Square only: all values with an absolute amplitude lower than that result in 0
bpy.ops.graph.view_all(include_handles=True)

Reset viewable area to show full keyframe range

Parameters:include_handles (boolean, (optional)) – Include Handles, Include handles of keyframes when calculating extents
bpy.ops.graph.view_frame()

Reset viewable area to show range around current frame

bpy.ops.graph.view_selected(include_handles=True)

Reset viewable area to show selected keyframe range

Parameters:include_handles (boolean, (optional)) – Include Handles, Include handles of keyframes when calculating extents