Blender  V2.93
Classes | Typedefs | Enumerations | Functions
ED_keyframes_edit.h File Reference
#include "ED_anim_api.h"

Go to the source code of this file.

Classes

struct  KeyframeEdit_LassoData
 
struct  KeyframeEdit_CircleData
 
struct  KeyframeEditData
 
struct  KeyframeEditCD_Remap
 

Typedefs

typedef enum eEditKeyframes_Validate eEditKeyframes_Validate
 
typedef enum eEditKeyframes_Select eEditKeyframes_Select
 
typedef enum eEditKeyframes_SelMap eEditKeyframes_SelMap
 
typedef enum eEditKeyframes_Snap eEditKeyframes_Snap
 
typedef enum eEditKeyframes_Mirror eEditKeyframes_Mirror
 
typedef struct KeyframeEdit_LassoData KeyframeEdit_LassoData
 
typedef struct KeyframeEdit_CircleData KeyframeEdit_CircleData
 
typedef enum eKeyframeVertOk eKeyframeVertOk
 
typedef enum eKeyframeIterFlags eKeyframeIterFlags
 
typedef struct KeyframeEditData KeyframeEditData
 
typedef void(* FcuEditFunc) (struct FCurve *fcu)
 
typedef short(* KeyframeEditFunc) (KeyframeEditData *ked, struct BezTriple *bezt)
 
typedef struct KeyframeEditCD_Remap KeyframeEditCD_Remap
 
typedef enum eKeyPasteOffset eKeyPasteOffset
 
typedef enum eKeyMergeMode eKeyMergeMode
 

Enumerations

enum  eEditKeyframes_Validate {
  BEZT_OK_FRAME = 1 , BEZT_OK_FRAMERANGE , BEZT_OK_SELECTED , 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
}
 
enum  eEditKeyframes_Select { SELECT_REPLACE = (1 << 0) , SELECT_ADD = (1 << 1) , SELECT_SUBTRACT = (1 << 2) , SELECT_INVERT = (1 << 3) }
 
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_Mirror {
  MIRROR_KEYS_CURFRAME = 1 , MIRROR_KEYS_YAXIS , MIRROR_KEYS_XAXIS , MIRROR_KEYS_MARKER ,
  MIRROR_KEYS_VALUE , MIRROR_KEYS_TIME
}
 
enum  eKeyframeVertOk { 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) }
 
enum  eKeyPasteOffset { KEYFRAME_PASTE_OFFSET_CFRA_START , KEYFRAME_PASTE_OFFSET_CFRA_END , KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE , KEYFRAME_PASTE_OFFSET_NONE }
 
enum  eKeyMergeMode { KEYFRAME_PASTE_MERGE_MIX , KEYFRAME_PASTE_MERGE_OVER , KEYFRAME_PASTE_MERGE_OVER_RANGE , KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL }
 

Functions

short ANIM_fcurve_keyframes_loop (KeyframeEditData *ked, struct FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
 
short ANIM_animchannel_keyframes_loop (KeyframeEditData *ked, struct bDopeSheet *ads, struct bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
 
short ANIM_animchanneldata_keyframes_loop (KeyframeEditData *ked, struct bDopeSheet *ads, void *data, int keytype, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
 
void ANIM_animdata_keyframe_callback (struct bAnimContext *ac, eAnimFilter_Flags filter, KeyframeEditFunc callback_fn)
 
void ANIM_editkeyframes_refresh (struct bAnimContext *ac)
 
KeyframeEditFunc ANIM_editkeyframes_ok (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_snap (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_mirror (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_select (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_handles (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_ipo (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_keytype (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_easing (short mode)
 
KeyframeEditFunc ANIM_editkeyframes_buildselmap (short mode)
 
short bezt_selmap_flush (KeyframeEditData *ked, struct BezTriple *bezt)
 
short bezt_calc_average (KeyframeEditData *ked, struct BezTriple *bezt)
 
short bezt_to_cfraelem (KeyframeEditData *ked, struct BezTriple *bezt)
 
void bezt_remap_times (KeyframeEditData *ked, struct BezTriple *bezt)
 
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])
 
void delete_fcurve_key (struct FCurve *fcu, int index, bool do_recalc)
 
bool delete_fcurve_keys (struct FCurve *fcu)
 
void clear_fcurve_keys (struct FCurve *fcu)
 
void duplicate_fcurve_keys (struct FCurve *fcu)
 
void clean_fcurve (struct bAnimContext *ac, struct bAnimListElem *ale, float thresh, bool cleardefault)
 
bool decimate_fcurve (struct bAnimListElem *ale, float remove_ratio, float error_sq_max)
 
void smooth_fcurve (struct FCurve *fcu)
 
void sample_fcurve (struct FCurve *fcu)
 
void ANIM_fcurves_copybuf_free (void)
 
short copy_animedit_keys (struct bAnimContext *ac, ListBase *anim_data)
 
short paste_animedit_keys (struct bAnimContext *ac, ListBase *anim_data, const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode, bool flip)
 

Typedef Documentation

◆ eEditKeyframes_Mirror

◆ eEditKeyframes_Select

◆ eEditKeyframes_SelMap

◆ eEditKeyframes_Snap

◆ eEditKeyframes_Validate

◆ eKeyframeIterFlags

◆ eKeyframeVertOk

◆ eKeyMergeMode

◆ eKeyPasteOffset

◆ FcuEditFunc

typedef void(* FcuEditFunc) (struct FCurve *fcu)

Definition at line 190 of file ED_keyframes_edit.h.

◆ KeyframeEdit_CircleData

◆ KeyframeEdit_LassoData

◆ KeyframeEditCD_Remap

◆ KeyframeEditData

◆ KeyframeEditFunc

typedef short(* KeyframeEditFunc) (KeyframeEditData *ked, struct BezTriple *bezt)

Definition at line 192 of file ED_keyframes_edit.h.

Enumeration Type Documentation

◆ eEditKeyframes_Mirror

Enumerator
MIRROR_KEYS_CURFRAME 
MIRROR_KEYS_YAXIS 
MIRROR_KEYS_XAXIS 
MIRROR_KEYS_MARKER 
MIRROR_KEYS_VALUE 
MIRROR_KEYS_TIME 

Definition at line 95 of file ED_keyframes_edit.h.

◆ eEditKeyframes_Select

Enumerator
SELECT_REPLACE 
SELECT_ADD 
SELECT_SUBTRACT 
SELECT_INVERT 

Definition at line 66 of file ED_keyframes_edit.h.

◆ eEditKeyframes_SelMap

Enumerator
SELMAP_MORE 
SELMAP_LESS 

Definition at line 78 of file ED_keyframes_edit.h.

◆ 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 84 of file ED_keyframes_edit.h.

◆ eEditKeyframes_Validate

Enumerator
BEZT_OK_FRAME 
BEZT_OK_FRAMERANGE 
BEZT_OK_SELECTED 
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 45 of file ED_keyframes_edit.h.

◆ eKeyframeIterFlags

Enumerator
KEYFRAME_ITER_INCL_HANDLES 
KED_F1_NLA_UNMAP 
KED_F2_NLA_UNMAP 
KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE 

Definition at line 138 of file ED_keyframes_edit.h.

◆ eKeyframeVertOk

Enumerator
KEYFRAME_OK_KEY 
KEYFRAME_OK_H1 
KEYFRAME_OK_H2 
KEYFRAME_OK_ALL 

Definition at line 126 of file ED_keyframes_edit.h.

◆ eKeyMergeMode

Enumerator
KEYFRAME_PASTE_MERGE_MIX 
KEYFRAME_PASTE_MERGE_OVER 
KEYFRAME_PASTE_MERGE_OVER_RANGE 
KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL 

Definition at line 214 of file ED_keyframes_edit.h.

◆ eKeyPasteOffset

Enumerator
KEYFRAME_PASTE_OFFSET_CFRA_START 
KEYFRAME_PASTE_OFFSET_CFRA_END 
KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE 
KEYFRAME_PASTE_OFFSET_NONE 

Definition at line 203 of file ED_keyframes_edit.h.

Function Documentation

◆ ANIM_animchannel_keyframes_loop()

short ANIM_animchannel_keyframes_loop ( KeyframeEditData ked,
struct bDopeSheet ads,
struct bAnimListElem ale,
KeyframeEditFunc  key_ok,
KeyframeEditFunc  key_cb,
FcuEditFunc  fcu_cb 
)

◆ ANIM_animchanneldata_keyframes_loop()

short ANIM_animchanneldata_keyframes_loop ( KeyframeEditData ked,
struct bDopeSheet ads,
void *  data,
int  keytype,
KeyframeEditFunc  key_ok,
KeyframeEditFunc  key_cb,
FcuEditFunc  fcu_cb 
)

◆ ANIM_animdata_keyframe_callback()

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

◆ ANIM_editkeyframes_buildselmap()

KeyframeEditFunc ANIM_editkeyframes_buildselmap ( short  mode)

◆ ANIM_editkeyframes_easing()

KeyframeEditFunc ANIM_editkeyframes_easing ( short  mode)

◆ ANIM_editkeyframes_handles()

KeyframeEditFunc ANIM_editkeyframes_handles ( short  mode)

◆ ANIM_editkeyframes_ipo()

KeyframeEditFunc ANIM_editkeyframes_ipo ( short  mode)

◆ ANIM_editkeyframes_keytype()

KeyframeEditFunc ANIM_editkeyframes_keytype ( short  mode)

◆ ANIM_editkeyframes_mirror()

KeyframeEditFunc ANIM_editkeyframes_mirror ( short  mode)

◆ ANIM_editkeyframes_ok()

KeyframeEditFunc ANIM_editkeyframes_ok ( short  mode)

◆ ANIM_editkeyframes_refresh()

void ANIM_editkeyframes_refresh ( struct bAnimContext ac)

◆ ANIM_editkeyframes_select()

KeyframeEditFunc ANIM_editkeyframes_select ( short  mode)

◆ ANIM_editkeyframes_snap()

KeyframeEditFunc ANIM_editkeyframes_snap ( short  mode)

◆ ANIM_fcurve_keyframes_loop()

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

◆ ANIM_fcurves_copybuf_free()

void ANIM_fcurves_copybuf_free ( void  )

◆ bezt_calc_average()

short bezt_calc_average ( KeyframeEditData ked,
BezTriple bezt 
)

Helper callback for <animeditor>_cfrasnap_exec() -> used to help get the average time of all selected beztriples

Definition at line 794 of file keyframes_edit.c.

References KeyframeEditData::f1, KeyframeEditData::f2, BezTriple::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,
struct BezTriple bezt 
)

◆ bezt_selmap_flush()

short bezt_selmap_flush ( KeyframeEditData ked,
struct BezTriple bezt 
)

◆ bezt_to_cfraelem()

short bezt_to_cfraelem ( KeyframeEditData ked,
struct BezTriple bezt 
)

◆ clean_fcurve()

void clean_fcurve ( struct bAnimContext ac,
bAnimListElem ale,
float  thresh,
bool  cleardefault 
)

◆ clear_fcurve_keys()

void clear_fcurve_keys ( struct FCurve fcu)

◆ copy_animedit_keys()

short copy_animedit_keys ( struct bAnimContext ac,
ListBase anim_data 
)

◆ decimate_fcurve()

bool decimate_fcurve ( bAnimListElem ale,
float  remove_ratio,
float  error_sq_max 
)

F-Curve 'decimate' function that removes a certain ratio of curve points that will affect the curves overall shape the least. If you want to remove based on a error margin, set remove_ratio to 1 and simply specify the desired error_sq_max. Otherwise, set the error margin to FLT_MAX.

Definition at line 407 of file keyframes_general.c.

References FCurve::bezt, BEZT_FLAG_TEMP_TAG, decimate_fcurve_segment(), BezTriple::f2, if(), insert_bezt_fcurve(), bAnimListElem::key_data, MEM_freeN, NULL, prepare_for_decimate(), SELECT, and FCurve::totvert.

Referenced by decimate_graph_keys().

◆ delete_fcurve_key()

void delete_fcurve_key ( FCurve fcu,
int  index,
bool  do_recalc 
)

Only delete the nominated keyframe from provided F-Curve. Not recommended to be used many times successively. For that there is delete_fcurve_keys().

Definition at line 71 of file keyframes_general.c.

References abs(), FCurve::bezt, calchandles_fcurve(), MEM_freeN, NULL, and FCurve::totvert.

Referenced by delete_key_button_exec(), delete_keyframe_fcurve(), insert_keyframe_value(), poselib_remove_exec(), posttrans_fcurve_clean(), and pyrna_struct_keyframe_delete().

◆ delete_fcurve_keys()

bool delete_fcurve_keys ( struct FCurve fcu)

◆ duplicate_fcurve_keys()

void duplicate_fcurve_keys ( struct FCurve fcu)

◆ keyframe_region_circle_test()

bool keyframe_region_circle_test ( const KeyframeEdit_CircleData data_circle,
const float  xy[2] 
)

◆ keyframe_region_lasso_test()

bool keyframe_region_lasso_test ( const KeyframeEdit_LassoData data_lasso,
const float  xy[2] 
)

◆ paste_animedit_keys()

short paste_animedit_keys ( bAnimContext ac,
ListBase anim_data,
const eKeyPasteOffset  offset_mode,
const eKeyMergeMode  merge_mode,
bool  flip 
)

◆ sample_fcurve()

void sample_fcurve ( struct FCurve fcu)

◆ smooth_fcurve()

void smooth_fcurve ( struct FCurve fcu)