Blender V5.0
ED_keyframes_edit.hh File Reference
#include "BLI_array.hh"
#include "BLI_math_vector_types.hh"
#include "ED_anim_api.hh"
#include "DNA_curve_types.h"

Go to the source code of this file.

Classes

struct  KeyframeEdit_LassoData
struct  KeyframeEdit_CircleData
struct  CfraElem
struct  KeyframeEditData
struct  KeyframeEditCD_Remap
struct  FCurveSegment
struct  KeyframePasteContext

Typedefs

Function Pointer Typedefs
using FcuEditFunc = void (*)(FCurve *fcu)
using KeyframeEditFunc = short (*)(KeyframeEditData *ked, BezTriple *bezt)

Enumerations

enum  eEditKeyframes_Select {
  SELECT_REPLACE = (1 << 0) , SELECT_ADD = (1 << 1) , SELECT_SUBTRACT = (1 << 2) , SELECT_INVERT = (1 << 3) ,
  SELECT_EXTEND_RANGE = (1 << 4)
}
enum  eEditKeyframes_SelMap { SELMAP_MORE = 0 , SELMAP_LESS }
enum  eEditKeyframes_Snap {
  SNAP_KEYS_CURFRAME = 1 , SNAP_KEYS_NEARFRAME , SNAP_KEYS_NEARSEC , SNAP_KEYS_NEARMARKER ,
  SNAP_KEYS_HORIZONTAL , SNAP_KEYS_VALUE , SNAP_KEYS_TIME
}
enum  eEditKeyframes_Equalize { EQUALIZE_HANDLES_LEFT = (1 << 0) , EQUALIZE_HANDLES_RIGHT = (1 << 1) , EQUALIZE_HANDLES_BOTH = (EQUALIZE_HANDLES_LEFT | EQUALIZE_HANDLES_RIGHT) }
enum  eEditKeyframes_Mirror {
  MIRROR_KEYS_CURFRAME = 1 , MIRROR_KEYS_YAXIS , MIRROR_KEYS_XAXIS , MIRROR_KEYS_MARKER ,
  MIRROR_KEYS_VALUE , MIRROR_KEYS_TIME
}
Tool Flags
enum  eEditKeyframes_Validate {
  BEZT_OK_FRAME = 1 , BEZT_OK_FRAMERANGE , BEZT_OK_SELECTED , BEZT_OK_SELECTED_KEY ,
  BEZT_OK_VALUE , BEZT_OK_VALUERANGE , BEZT_OK_REGION , BEZT_OK_REGION_LASSO ,
  BEZT_OK_REGION_CIRCLE , BEZT_OK_CHANNEL_LASSO , BEZT_OK_CHANNEL_CIRCLE
}
Defines for 'OK' polls + KeyframeEditData Flags
enum  eKeyframeVertOk {
  KEYFRAME_NONE = 0 , KEYFRAME_OK_KEY = (1 << 0) , KEYFRAME_OK_H1 = (1 << 1) , KEYFRAME_OK_H2 = (1 << 2) ,
  KEYFRAME_OK_ALL = (KEYFRAME_OK_KEY | KEYFRAME_OK_H1 | KEYFRAME_OK_H2)
}
enum  eKeyframeIterFlags {
  KEYFRAME_ITER_INCL_HANDLES = (1 << 0) , KED_F1_NLA_UNMAP = (1 << 1) , KED_F2_NLA_UNMAP = (1 << 2) , KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE = (1 << 3) ,
  KEYFRAME_ITER_HANDLES_INVISIBLE = (1 << 4)
}
Custom Data Type Defines
enum  eKeyPasteOffset { KEYFRAME_PASTE_OFFSET_CFRA_START , KEYFRAME_PASTE_OFFSET_CFRA_END , KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE , KEYFRAME_PASTE_OFFSET_NONE }
enum  eKeyPasteValueOffset {
  KEYFRAME_PASTE_VALUE_OFFSET_LEFT_KEY , KEYFRAME_PASTE_VALUE_OFFSET_RIGHT_KEY , KEYFRAME_PASTE_VALUE_OFFSET_CFRA , KEYFRAME_PASTE_VALUE_OFFSET_CURSOR ,
  KEYFRAME_PASTE_VALUE_OFFSET_NONE
}
enum  eKeyMergeMode { KEYFRAME_PASTE_MERGE_MIX , KEYFRAME_PASTE_MERGE_OVER , KEYFRAME_PASTE_MERGE_OVER_RANGE , KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL }
enum  eKeyPasteError { KEYFRAME_PASTE_OK , KEYFRAME_PASTE_NOTHING_TO_PASTE , KEYFRAME_PASTE_NOWHERE_TO_PASTE }

Functions

Looping API

Functions for looping over keyframes.

short ANIM_fcurve_keyframes_loop (KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
void ANIM_fcurve_equalize_keyframes_loop (FCurve *fcu, eEditKeyframes_Equalize mode, float handle_length, bool flatten)
short ANIM_animchannel_keyframes_loop (KeyframeEditData *ked, bDopeSheet *ads, bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
void ANIM_animdata_keyframe_callback (bAnimContext *ac, eAnimFilter_Flags filter, KeyframeEditFunc callback_fn)
void ANIM_editkeyframes_refresh (bAnimContext *ac)
BezTriple Callback Getters
KeyframeEditFunc ANIM_editkeyframes_ok (short mode)
KeyframeEditFunc ANIM_editkeyframes_snap (short mode)
KeyframeEditFunc ANIM_editkeyframes_mirror (short mode)
KeyframeEditFunc ANIM_editkeyframes_select (eEditKeyframes_Select selectmode)
KeyframeEditFunc ANIM_editkeyframes_handles (short mode)
KeyframeEditFunc ANIM_editkeyframes_ipo (short mode)
KeyframeEditFunc ANIM_editkeyframes_keytype (eBezTriple_KeyframeType keyframe_type)
KeyframeEditFunc ANIM_editkeyframes_easing (short mode)
BezTriple Callbacks (Selection Map)
KeyframeEditFunc ANIM_editkeyframes_buildselmap (short mode)
short bezt_selmap_flush (KeyframeEditData *ked, BezTriple *bezt)
BezTriple Callback (Assorted Utilities)
short bezt_calc_average (KeyframeEditData *ked, BezTriple *bezt)
short bezt_to_cfraelem (KeyframeEditData *ked, BezTriple *bezt)
void bezt_remap_times (KeyframeEditData *ked, BezTriple *bezt)

1.5-D Region Testing Utilities (Lasso/Circle Select)

enum class  FCurveSegmentAnchor { LEFT , RIGHT }
enum  tShearDirection { SHEAR_FROM_LEFT = 1 , SHEAR_FROM_RIGHT }
bool keyframe_region_lasso_test (const KeyframeEdit_LassoData *data_lasso, const float xy[2])
bool keyframe_region_circle_test (const KeyframeEdit_CircleData *data_circle, const float xy[2])
bool duplicate_fcurve_keys (FCurve *fcu)
float get_default_rna_value (const FCurve *fcu, PropertyRNA *prop, PointerRNA *ptr)
ListBase find_fcurve_segments (FCurve *fcu)
void clean_fcurve (bAnimListElem *ale, float thresh, bool cleardefault, bool only_selected_keys)
void blend_to_neighbor_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void breakdown_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void scale_average_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void push_pull_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void scale_from_fcurve_segment_neighbor (FCurve *fcu, FCurveSegment *segment, float factor, FCurveSegmentAnchor anchor)
void ED_ANIM_get_1d_gauss_kernel (const float sigma, int kernel_size, double *r_kernel)
ButterworthCoefficientsED_anim_allocate_butterworth_coefficients (const int filter_order)
void ED_anim_free_butterworth_coefficients (ButterworthCoefficients *bw_coeff)
void ED_anim_calculate_butterworth_coefficients (float cutoff_frequency, float sampling_frequency, ButterworthCoefficients *bw_coeff)
void butterworth_smooth_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float *samples, int sample_count, float factor, int blend_in_out, int sample_rate, ButterworthCoefficients *bw_coeff)
void smooth_fcurve_segment (FCurve *fcu, FCurveSegment *segment, const float *original_values, float *samples, const int sample_count, float factor, int kernel_size, const double *kernel)
void ease_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor, float width)
void shear_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor, tShearDirection direction)
void blend_offset_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void blend_to_ease_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void time_offset_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float frame_offset)
bool decimate_fcurve (bAnimListElem *ale, float remove_ratio, float error_sq_max)
bool match_slope_fcurve_segment (FCurve *fcu, FCurveSegment *segment, float factor)
void blend_to_default_fcurve (PointerRNA *id_ptr, FCurve *fcu, float factor)
void smooth_fcurve (FCurve *fcu)
void ANIM_fcurves_copybuf_reset ()
void ANIM_fcurves_copybuf_free ()
bool copy_animedit_keys (bAnimContext *ac, ListBase *anim_data)
eKeyPasteError paste_animedit_keys (bAnimContext *ac, ListBase *anim_data, const KeyframePasteContext &paste_context)

Typedef Documentation

◆ FcuEditFunc

using FcuEditFunc = void (*)(FCurve *fcu)

Callback function that refreshes the F-Curve after use.

Definition at line 219 of file ED_keyframes_edit.hh.

◆ KeyframeEditFunc

using KeyframeEditFunc = short (*)(KeyframeEditData *ked, BezTriple *bezt)

Callback function that operates on the given BezTriple.

Definition at line 221 of file ED_keyframes_edit.hh.

Enumeration Type Documentation

◆ eEditKeyframes_Equalize

Enumerator
EQUALIZE_HANDLES_LEFT 
EQUALIZE_HANDLES_RIGHT 
EQUALIZE_HANDLES_BOTH 

Definition at line 87 of file ED_keyframes_edit.hh.

◆ eEditKeyframes_Mirror

Enumerator
MIRROR_KEYS_CURFRAME 
MIRROR_KEYS_YAXIS 
MIRROR_KEYS_XAXIS 
MIRROR_KEYS_MARKER 
MIRROR_KEYS_VALUE 
MIRROR_KEYS_TIME 

Definition at line 94 of file ED_keyframes_edit.hh.

◆ eEditKeyframes_Select

Enumerator
SELECT_REPLACE 
SELECT_ADD 
SELECT_SUBTRACT 
SELECT_INVERT 
SELECT_EXTEND_RANGE 

Definition at line 57 of file ED_keyframes_edit.hh.

◆ eEditKeyframes_SelMap

Enumerator
SELMAP_MORE 
SELMAP_LESS 

Definition at line 70 of file ED_keyframes_edit.hh.

◆ eEditKeyframes_Snap

Enumerator
SNAP_KEYS_CURFRAME 
SNAP_KEYS_NEARFRAME 
SNAP_KEYS_NEARSEC 
SNAP_KEYS_NEARMARKER 
SNAP_KEYS_HORIZONTAL 
SNAP_KEYS_VALUE 
SNAP_KEYS_TIME 

Definition at line 76 of file ED_keyframes_edit.hh.

◆ eEditKeyframes_Validate

bezt validation.

Enumerator
BEZT_OK_FRAME 
BEZT_OK_FRAMERANGE 
BEZT_OK_SELECTED 
BEZT_OK_SELECTED_KEY 
BEZT_OK_VALUE 
BEZT_OK_VALUERANGE 
BEZT_OK_REGION 
BEZT_OK_REGION_LASSO 
BEZT_OK_REGION_CIRCLE 
BEZT_OK_CHANNEL_LASSO 
BEZT_OK_CHANNEL_CIRCLE 

Definition at line 34 of file ED_keyframes_edit.hh.

◆ eKeyframeIterFlags

Enumerator
KEYFRAME_ITER_INCL_HANDLES 
KED_F1_NLA_UNMAP 
KED_F2_NLA_UNMAP 
KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE 
KEYFRAME_ITER_HANDLES_INVISIBLE 

Definition at line 139 of file ED_keyframes_edit.hh.

◆ eKeyframeVertOk

Enumerator
KEYFRAME_NONE 
KEYFRAME_OK_KEY 
KEYFRAME_OK_H1 
KEYFRAME_OK_H2 
KEYFRAME_OK_ALL 

Definition at line 126 of file ED_keyframes_edit.hh.

◆ eKeyMergeMode

Enumerator
KEYFRAME_PASTE_MERGE_MIX 

Overlay existing with new keys.

KEYFRAME_PASTE_MERGE_OVER 

Replace entire fcurve.

KEYFRAME_PASTE_MERGE_OVER_RANGE 

Overwrite keys in pasted range.

KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL 

Overwrite keys in pasted range (use all keyframe start & end for range).

Definition at line 260 of file ED_keyframes_edit.hh.

◆ eKeyPasteError

Possible errors occurring while pasting keys.

Enumerator
KEYFRAME_PASTE_OK 

No errors occurred.

KEYFRAME_PASTE_NOTHING_TO_PASTE 

Nothing was copied.

KEYFRAME_PASTE_NOWHERE_TO_PASTE 

No F-curves was selected to paste into.

Definition at line 272 of file ED_keyframes_edit.hh.

◆ eKeyPasteOffset

Paste options.

Enumerator
KEYFRAME_PASTE_OFFSET_CFRA_START 

Paste keys starting at current frame.

KEYFRAME_PASTE_OFFSET_CFRA_END 

Paste keys ending at current frame.

KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE 

Paste keys relative to the current frame when copying.

KEYFRAME_PASTE_OFFSET_NONE 

Paste keys from original time.

Definition at line 236 of file ED_keyframes_edit.hh.

◆ eKeyPasteValueOffset

Enumerator
KEYFRAME_PASTE_VALUE_OFFSET_LEFT_KEY 

Paste keys with the first key matching the key left of the cursor.

KEYFRAME_PASTE_VALUE_OFFSET_RIGHT_KEY 

Paste keys with the last key matching the key right of the cursor.

KEYFRAME_PASTE_VALUE_OFFSET_CFRA 

Paste keys relative to the value of the curve under the cursor.

KEYFRAME_PASTE_VALUE_OFFSET_CURSOR 

Paste values relative to the cursor position.

KEYFRAME_PASTE_VALUE_OFFSET_NONE 

Paste keys with the exact copied value.

Definition at line 247 of file ED_keyframes_edit.hh.

◆ FCurveSegmentAnchor

enum class FCurveSegmentAnchor
strong

Used for operators that need a reference key of the segment to work.

Enumerator
LEFT 
RIGHT 

Definition at line 440 of file ED_keyframes_edit.hh.

◆ tShearDirection

Enumerator
SHEAR_FROM_LEFT 
SHEAR_FROM_RIGHT 

Definition at line 483 of file ED_keyframes_edit.hh.

Function Documentation

◆ ANIM_animchannel_keyframes_loop()

◆ ANIM_animdata_keyframe_callback()

void ANIM_animdata_keyframe_callback ( bAnimContext * ac,
eAnimFilter_Flags filter,
KeyframeEditFunc callback_fn )

Calls callback_fn() for each keyframe in each fcurve in the filtered animation context. Assumes the callback updates keys.

Definition at line 473 of file keyframes_edit.cc.

References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_update(), ANIM_fcurve_keyframes_loop(), ANIM_UPDATE_DEFAULT, BKE_fcurve_handles_recalc(), bAnimContext::data, bAnimContext::datatype, filter, and LISTBASE_FOREACH.

Referenced by actkeys_easing_exec(), and actkeys_ipo_exec().

◆ ANIM_editkeyframes_buildselmap()

KeyframeEditFunc ANIM_editkeyframes_buildselmap ( short mode)

Get a callback to populate the selection settings map requires: ked->custom = char[] of length fcurve->totvert.

Definition at line 1725 of file keyframes_edit.cc.

References selmap_build_bezier_less(), selmap_build_bezier_more(), SELMAP_LESS, and SELMAP_MORE.

Referenced by select_moreless_action_keys(), and select_moreless_graph_keys().

◆ ANIM_editkeyframes_easing()

◆ ANIM_editkeyframes_handles()

KeyframeEditFunc ANIM_editkeyframes_handles ( short mode)

◆ ANIM_editkeyframes_ipo()

◆ ANIM_editkeyframes_keytype()

◆ ANIM_editkeyframes_mirror()

KeyframeEditFunc ANIM_editkeyframes_mirror ( short mode)

◆ ANIM_editkeyframes_ok()

◆ ANIM_editkeyframes_refresh()

◆ ANIM_editkeyframes_select()

◆ ANIM_editkeyframes_snap()

◆ ANIM_fcurve_equalize_keyframes_loop()

void ANIM_fcurve_equalize_keyframes_loop ( FCurve * fcu,
eEditKeyframes_Equalize mode,
float handle_length,
bool flatten )

Sets selected keyframes' bezier handles to an equal length and optionally makes the keyframes' handles horizontal.

Parameters
handle_lengthDesired handle length, must be positive.
flattenMakes the keyframes' handles the same value as the keyframe, flattening the curve at that point.

Definition at line 1344 of file keyframes_edit.cc.

References FCurve::bezt, ELEM, EQUALIZE_HANDLES_LEFT, EQUALIZE_HANDLES_RIGHT, BezTriple::f2, BezTriple::h1, BezTriple::h2, handle_flatten(), handle_set_length(), HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_VECT, i, SELECT, and BezTriple::vec.

Referenced by equalize_graph_keys().

◆ ANIM_fcurve_keyframes_loop()

short ANIM_fcurve_keyframes_loop ( KeyframeEditData * ked,
FCurve * fcu,
KeyframeEditFunc key_ok,
KeyframeEditFunc key_cb,
FcuEditFunc fcu_cb )

This function is used to loop over BezTriples in the given F-Curve, applying a given operation on them, and optionally applies an F-Curve validation function afterwards.

function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this).

Definition at line 62 of file keyframes_edit.cc.

References FCurve::bezt, KeyframeEditData::curflags, KeyframeEditData::curIndex, ELEM, KeyframeEditData::fcu, i, and KEYFRAME_NONE.

Referenced by action_layered_keyframes_loop(), action_legacy_keyframes_loop(), actkeys_framejump_exec(), actkeys_mselect_column(), actkeys_select_leftright(), actkeys_select_linked_exec(), agrp_keyframes_loop(), ANIM_animchannel_keyframes_loop(), ANIM_animdata_keyframe_callback(), ANIM_nla_mapping_apply_fcurve(), box_select_graphcurves(), box_select_graphkeys(), columnselect_action_keys(), columnselect_graph_keys(), copy_animedit_keys(), deselect_action_keys(), deselect_graph_keys(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), markers_selectkeys_between(), markers_selectkeys_between(), mirror_action_keys(), mirror_graph_keys(), mouse_graph_keys(), nlaedit_apply_scale_exec(), ob_keyframes_loop(), scene_keyframes_loop(), select_moreless_action_keys(), select_moreless_graph_keys(), seteasing_graph_keys(), sethandles_action_keys(), sethandles_graph_keys(), setipo_graph_keys(), setkeytype_action_keys(), snap_action_keys(), snap_graph_keys(), sum_selected_keyframes(), and summary_keyframes_loop().

◆ ANIM_fcurves_copybuf_free()

void ANIM_fcurves_copybuf_free ( )

◆ ANIM_fcurves_copybuf_reset()

◆ bezt_calc_average()

short bezt_calc_average ( KeyframeEditData * ked,
BezTriple * bezt )

Used to calculate the average location of all relevant BezTriples by summing their locations.

Definition at line 806 of file keyframes_edit.cc.

References KeyframeEditData::f1, BezTriple::f2, KeyframeEditData::f2, KeyframeEditData::i1, SELECT, and BezTriple::vec.

Referenced by actkeys_framejump_exec(), and sum_selected_keyframes().

◆ bezt_remap_times()

void bezt_remap_times ( KeyframeEditData * ked,
BezTriple * bezt )

Used to remap times from one range to another. requires: ked->custom = KeyframeEditCD_Remap.

Definition at line 847 of file keyframes_edit.cc.

References KeyframeEditData::data, KeyframeEditCD_Remap::newMax, KeyframeEditCD_Remap::newMin, KeyframeEditCD_Remap::oldMax, KeyframeEditCD_Remap::oldMin, and BezTriple::vec.

◆ bezt_selmap_flush()

short bezt_selmap_flush ( KeyframeEditData * ked,
BezTriple * bezt )

Change the selection status of the keyframe based on the map entry for this vert requires: ked->custom = char[] of length fcurve->totvert.

Definition at line 1739 of file keyframes_edit.cc.

References BEZT_DESEL_ALL, BEZT_SEL_ALL, KeyframeEditData::curIndex, and KeyframeEditData::data.

Referenced by select_moreless_action_keys(), and select_moreless_graph_keys().

◆ bezt_to_cfraelem()

short bezt_to_cfraelem ( KeyframeEditData * ked,
BezTriple * bezt )

◆ blend_offset_fcurve_segment()

void blend_offset_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

Shift the FCurve segment up/down so that it aligns with the key before/after the segment.

Parameters
factorblend factor from -1.0 to 1.0. The sign determines whether the segment is aligned with the key before or after the segment.

Definition at line 726 of file keyframes_general.cc.

References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fabs(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, and BezTriple::vec.

Referenced by blend_offset_graph_keys().

◆ blend_to_default_fcurve()

void blend_to_default_fcurve ( PointerRNA * id_ptr,
FCurve * fcu,
float factor )

Blends the selected keyframes to the default value of the property the F-curve drives.

Definition at line 377 of file keyframes_general.cc.

References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), BezTriple::f2, get_default_rna_value(), i, interpf(), ptr, FCurve::rna_path, RNA_path_resolve_property(), SELECT, FCurve::totvert, and BezTriple::vec.

Referenced by blend_to_default_graph_keys().

◆ blend_to_ease_fcurve_segment()

void blend_to_ease_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

◆ blend_to_neighbor_fcurve_segment()

void blend_to_neighbor_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

◆ breakdown_fcurve_segment()

void breakdown_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

◆ butterworth_smooth_fcurve_segment()

void butterworth_smooth_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float * samples,
int sample_count,
float factor,
int blend_in_out,
int sample_rate,
ButterworthCoefficients * bw_coeff )
Parameters
samplesAre expected to start at the first frame of the segment with a buffer of size segment->filter_order at the left.

Definition at line 518 of file keyframes_general.cc.

References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), butterworth_calculate_blend_value(), butterworth_filter_value(), ButterworthCoefficients::filter_order, float, i, interpf(), MEM_calloc_arrayN(), MEM_freeN(), min_ff(), min_ii(), round, BezTriple::vec, and x.

Referenced by btw_smooth_graph_keys(), and btw_smooth_modal_update().

◆ clean_fcurve()

◆ copy_animedit_keys()

◆ decimate_fcurve()

◆ duplicate_fcurve_keys()

bool duplicate_fcurve_keys ( FCurve * fcu)

◆ ease_fcurve_segment()

void ease_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor,
float width )

Snap the keys on the given FCurve segment to an S-Curve. By modifying the factor the part of the S-Curve that the keys are snapped to is moved on the x-axis.

Definition at line 689 of file keyframes_general.cc.

References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), blend(), ease_sigmoid_function(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, IS_EQF, BezTriple::vec, x, and y.

Referenced by ease_graph_keys().

◆ ED_anim_allocate_butterworth_coefficients()

◆ ED_anim_calculate_butterworth_coefficients()

void ED_anim_calculate_butterworth_coefficients ( float cutoff_frequency,
float sampling_frequency,
ButterworthCoefficients * bw_coeff )

◆ ED_anim_free_butterworth_coefficients()

void ED_anim_free_butterworth_coefficients ( ButterworthCoefficients * bw_coeff)

◆ ED_ANIM_get_1d_gauss_kernel()

void ED_ANIM_get_1d_gauss_kernel ( const float sigma,
int kernel_size,
double * r_kernel )

Get a 1D gauss kernel. Since the kernel is symmetrical, only calculates the positive side.

Parameters
sigmaThe shape of the gauss distribution.
kernel_sizeHow long the kernel array is.

Definition at line 610 of file keyframes_general.cc.

References BLI_assert, exp, i, and sum().

Referenced by gaussian_smooth_allocate_operator_data(), and gaussian_smooth_exec().

◆ find_fcurve_segments()

ListBase find_fcurve_segments ( FCurve * fcu)

Return a list of FCurveSegment with a start index and a length. A segment is a continuous selection of keyframes. Keys that have BEZT_FLAG_IGNORE_TAG set are treated as unselected. The caller is responsible for freeing the memory.

Definition at line 281 of file keyframes_general.cc.

References FCurve::bezt, BLI_addtail(), find_fcurve_segment(), and MEM_callocN().

Referenced by apply_fcu_segment_function(), btw_smooth_allocate_operator_data(), btw_smooth_graph_keys(), decimate_fcurve(), ease_graph_keys(), gaussian_smooth_allocate_operator_data(), gaussian_smooth_graph_keys(), match_slope_graph_keys(), scale_from_neighbor_graph_keys(), and shear_graph_keys().

◆ get_default_rna_value()

◆ keyframe_region_circle_test()

◆ keyframe_region_lasso_test()

◆ match_slope_fcurve_segment()

bool match_slope_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

◆ paste_animedit_keys()

◆ push_pull_fcurve_segment()

void push_pull_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

◆ scale_average_fcurve_segment()

void scale_average_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor )

◆ scale_from_fcurve_segment_neighbor()

void scale_from_fcurve_segment_neighbor ( FCurve * fcu,
FCurveSegment * segment,
float factor,
FCurveSegmentAnchor anchor )

◆ shear_fcurve_segment()

void shear_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float factor,
tShearDirection direction )

◆ smooth_fcurve()

void smooth_fcurve ( FCurve * fcu)

◆ smooth_fcurve_segment()

void smooth_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
const float * original_values,
float * samples,
const int sample_count,
float factor,
int kernel_size,
const double * kernel )

◆ time_offset_fcurve_segment()

void time_offset_fcurve_segment ( FCurve * fcu,
FCurveSegment * segment,
float frame_offset )