Blender
V3.3
|
#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 |
struct | FCurveSegment |
Typedefs | |
typedef enum eEditKeyframes_Select | eEditKeyframes_Select |
typedef enum eEditKeyframes_SelMap | eEditKeyframes_SelMap |
typedef enum eEditKeyframes_Snap | eEditKeyframes_Snap |
typedef enum eEditKeyframes_Equalize | eEditKeyframes_Equalize |
typedef enum eEditKeyframes_Mirror | eEditKeyframes_Mirror |
typedef struct KeyframeEdit_LassoData | KeyframeEdit_LassoData |
typedef struct KeyframeEdit_CircleData | KeyframeEdit_CircleData |
Generic Properties for Keyframe Edit Tools | |
typedef struct KeyframeEditData | KeyframeEditData |
Function Pointer Typedefs | |
typedef void(* | FcuEditFunc) (struct FCurve *fcu) |
typedef short(* | KeyframeEditFunc) (KeyframeEditData *ked, struct BezTriple *bezt) |
Enumerations | |
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_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_VALUE , BEZT_OK_VALUERANGE , BEZT_OK_REGION , BEZT_OK_REGION_LASSO , BEZT_OK_REGION_CIRCLE , BEZT_OK_CHANNEL_LASSO , BEZT_OK_CHANNEL_CIRCLE } |
typedef enum eEditKeyframes_Validate | eEditKeyframes_Validate |
Defines for 'OK' polls + KeyframeEditData Flags | |
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) } |
typedef enum eKeyframeVertOk | eKeyframeVertOk |
typedef enum eKeyframeIterFlags | eKeyframeIterFlags |
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 | 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 } |
typedef struct KeyframeEditCD_Remap | KeyframeEditCD_Remap |
typedef enum eKeyPasteOffset | eKeyPasteOffset |
typedef enum eKeyMergeMode | eKeyMergeMode |
typedef enum eKeyPasteError | eKeyPasteError |
typedef enum eEditKeyframes_Equalize eEditKeyframes_Equalize |
typedef enum eEditKeyframes_Mirror eEditKeyframes_Mirror |
typedef enum eEditKeyframes_Select eEditKeyframes_Select |
typedef enum eEditKeyframes_SelMap eEditKeyframes_SelMap |
typedef enum eEditKeyframes_Snap eEditKeyframes_Snap |
typedef enum eEditKeyframes_Validate eEditKeyframes_Validate |
typedef enum eKeyframeIterFlags eKeyframeIterFlags |
typedef enum eKeyframeVertOk eKeyframeVertOk |
typedef enum eKeyMergeMode eKeyMergeMode |
typedef enum eKeyPasteError eKeyPasteError |
typedef enum eKeyPasteOffset eKeyPasteOffset |
Definition at line 193 of file ED_keyframes_edit.h.
typedef struct FCurveSegment FCurveSegment |
typedef struct KeyframeEdit_CircleData KeyframeEdit_CircleData |
typedef struct KeyframeEdit_LassoData KeyframeEdit_LassoData |
typedef struct KeyframeEditCD_Remap KeyframeEditCD_Remap |
typedef struct KeyframeEditData KeyframeEditData |
typedef short(* KeyframeEditFunc) (KeyframeEditData *ked, struct BezTriple *bezt) |
Definition at line 195 of file ED_keyframes_edit.h.
Enumerator | |
---|---|
EQUALIZE_HANDLES_LEFT | |
EQUALIZE_HANDLES_RIGHT | |
EQUALIZE_HANDLES_BOTH |
Definition at line 81 of file ED_keyframes_edit.h.
Enumerator | |
---|---|
MIRROR_KEYS_CURFRAME | |
MIRROR_KEYS_YAXIS | |
MIRROR_KEYS_XAXIS | |
MIRROR_KEYS_MARKER | |
MIRROR_KEYS_VALUE | |
MIRROR_KEYS_TIME |
Definition at line 88 of file ED_keyframes_edit.h.
Enumerator | |
---|---|
SELECT_REPLACE | |
SELECT_ADD | |
SELECT_SUBTRACT | |
SELECT_INVERT |
Definition at line 52 of file ED_keyframes_edit.h.
Enumerator | |
---|---|
SELMAP_MORE | |
SELMAP_LESS |
Definition at line 64 of file ED_keyframes_edit.h.
enum 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 70 of file ED_keyframes_edit.h.
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 31 of file ED_keyframes_edit.h.
enum eKeyframeIterFlags |
Enumerator | |
---|---|
KEYFRAME_ITER_INCL_HANDLES | |
KED_F1_NLA_UNMAP | |
KED_F2_NLA_UNMAP | |
KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE |
Definition at line 133 of file ED_keyframes_edit.h.
enum eKeyframeVertOk |
Enumerator | |
---|---|
KEYFRAME_OK_KEY | |
KEYFRAME_OK_H1 | |
KEYFRAME_OK_H2 | |
KEYFRAME_OK_ALL |
Definition at line 121 of file ED_keyframes_edit.h.
enum eKeyMergeMode |
Enumerator | |
---|---|
KEYFRAME_PASTE_MERGE_MIX | |
KEYFRAME_PASTE_MERGE_OVER | |
KEYFRAME_PASTE_MERGE_OVER_RANGE | |
KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL |
Definition at line 221 of file ED_keyframes_edit.h.
enum eKeyPasteError |
Enumerator | |
---|---|
KEYFRAME_PASTE_OK | |
KEYFRAME_PASTE_NOTHING_TO_PASTE | |
KEYFRAME_PASTE_NOWHERE_TO_PASTE |
Definition at line 233 of file ED_keyframes_edit.h.
enum eKeyPasteOffset |
Enumerator | |
---|---|
KEYFRAME_PASTE_OFFSET_CFRA_START | |
KEYFRAME_PASTE_OFFSET_CFRA_END | |
KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE | |
KEYFRAME_PASTE_OFFSET_NONE |
Definition at line 210 of file ED_keyframes_edit.h.
short ANIM_animchannel_keyframes_loop | ( | KeyframeEditData * | ked, |
struct bDopeSheet * | ads, | ||
struct bAnimListElem * | ale, | ||
KeyframeEditFunc | key_ok, | ||
KeyframeEditFunc | key_cb, | ||
FcuEditFunc | fcu_cb | ||
) |
Function for working with any type (i.e. one of the known types) of animation channel.
Definition at line 362 of file keyframes_edit.c.
References act_keyframes_loop(), agrp_keyframes_loop(), ALE_ACT, ALE_ALL, ALE_FCURVE, ALE_GROUP, ALE_OB, ALE_SCE, ANIM_fcurve_keyframes_loop(), bAnimListElem::data, bAnimListElem::datatype, bAnimListElem::key_data, NULL, ob_keyframes_loop(), scene_keyframes_loop(), and summary_keyframes_loop().
Referenced by actkeys_mselect_channel_only(), actkeys_mselect_single(), box_select_elem(), and region_select_elem().
short ANIM_animchanneldata_keyframes_loop | ( | KeyframeEditData * | ked, |
struct bDopeSheet * | ads, | ||
void * | data, | ||
int | keytype, | ||
KeyframeEditFunc | key_ok, | ||
KeyframeEditFunc | key_cb, | ||
FcuEditFunc | fcu_cb | ||
) |
Same as above, except bAnimListElem wrapper is not needed.
keytype | is eAnim_KeyType. |
Definition at line 399 of file keyframes_edit.c.
References act_keyframes_loop(), agrp_keyframes_loop(), ALE_ACT, ALE_ALL, ALE_FCURVE, ALE_GROUP, ALE_OB, ALE_SCE, ANIM_fcurve_keyframes_loop(), data, NULL, ob_keyframes_loop(), scene_keyframes_loop(), and summary_keyframes_loop().
Referenced by nlaedit_apply_scale_exec(), and poselib_apply_pose().
void ANIM_animdata_keyframe_callback | ( | struct 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 437 of file keyframes_edit.c.
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(), ListBase::first, bAnimListElem::key_data, bAnimListElem::next, NULL, and bAnimListElem::update.
Referenced by actkeys_easing_exec(), and actkeys_ipo_exec().
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 1662 of file keyframes_edit.c.
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().
KeyframeEditFunc ANIM_editkeyframes_easing | ( | short | mode | ) |
Definition at line 1472 of file keyframes_edit.c.
References BEZT_IPO_EASE_IN, BEZT_IPO_EASE_IN_OUT, BEZT_IPO_EASE_OUT, set_easingtype_easeauto(), set_easingtype_easein(), set_easingtype_easeinout(), and set_easingtype_easeout().
Referenced by actkeys_easing_exec(), and seteasing_graph_keys().
KeyframeEditFunc ANIM_editkeyframes_handles | ( | short | mode | ) |
Set all selected Bezier Handles to a single type.
Definition at line 1145 of file keyframes_edit.c.
References bezier_isfree(), HD_ALIGN, HD_AUTO, HD_AUTO_ANIM, HD_FREE, HD_VECT, set_bezier_align(), set_bezier_auto(), set_bezier_auto_clamped(), set_bezier_free(), and set_bezier_vector().
Referenced by sethandles_action_keys(), and sethandles_graph_keys().
KeyframeEditFunc ANIM_editkeyframes_ipo | ( | short | mode | ) |
Set the interpolation type of the selected BezTriples in each F-Curve to the specified one.
Definition at line 1339 of file keyframes_edit.c.
References BEZT_IPO_BACK, BEZT_IPO_BOUNCE, BEZT_IPO_CIRC, BEZT_IPO_CONST, BEZT_IPO_CUBIC, BEZT_IPO_ELASTIC, BEZT_IPO_EXPO, BEZT_IPO_LIN, BEZT_IPO_QUAD, BEZT_IPO_QUART, BEZT_IPO_QUINT, BEZT_IPO_SINE, set_bezt_back(), set_bezt_bezier(), set_bezt_bounce(), set_bezt_circle(), set_bezt_constant(), set_bezt_cubic(), set_bezt_elastic(), set_bezt_expo(), set_bezt_linear(), set_bezt_quad(), set_bezt_quart(), set_bezt_quint(), and set_bezt_sine().
Referenced by actkeys_ipo_exec(), and setipo_graph_keys().
KeyframeEditFunc ANIM_editkeyframes_keytype | ( | short | mode | ) |
Definition at line 1417 of file keyframes_edit.c.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_EXTREME, BEZT_KEYTYPE_JITTER, BEZT_KEYTYPE_KEYFRAME, BEZT_KEYTYPE_MOVEHOLD, set_keytype_breakdown(), set_keytype_extreme(), set_keytype_jitter(), set_keytype_keyframe(), and set_keytype_moving_hold().
Referenced by setkeytype_action_keys().
KeyframeEditFunc ANIM_editkeyframes_mirror | ( | short | mode | ) |
Definition at line 988 of file keyframes_edit.c.
References mirror_bezier_cframe(), mirror_bezier_marker(), mirror_bezier_time(), mirror_bezier_value(), mirror_bezier_xaxis(), mirror_bezier_yaxis(), MIRROR_KEYS_CURFRAME, MIRROR_KEYS_MARKER, MIRROR_KEYS_TIME, MIRROR_KEYS_VALUE, MIRROR_KEYS_XAXIS, and MIRROR_KEYS_YAXIS.
Referenced by mirror_action_keys(), and mirror_graph_keys().
KeyframeEditFunc ANIM_editkeyframes_ok | ( | short | mode | ) |
Definition at line 718 of file keyframes_edit.c.
References BEZT_OK_CHANNEL_CIRCLE, BEZT_OK_CHANNEL_LASSO, BEZT_OK_FRAME, BEZT_OK_FRAMERANGE, BEZT_OK_REGION, BEZT_OK_REGION_CIRCLE, BEZT_OK_REGION_LASSO, BEZT_OK_SELECTED, BEZT_OK_VALUE, BEZT_OK_VALUERANGE, NULL, ok_bezier_channel_circle(), ok_bezier_channel_lasso(), ok_bezier_frame(), ok_bezier_framerange(), ok_bezier_region(), ok_bezier_region_circle(), ok_bezier_region_lasso(), ok_bezier_selected(), ok_bezier_value(), and ok_bezier_valuerange().
Referenced by actkeys_mselect_column(), actkeys_mselect_single(), actkeys_select_leftright(), actkeys_select_linked_exec(), box_select_action(), box_select_graphkeys(), columnselect_action_keys(), columnselect_graph_keys(), copy_animedit_keys(), deselect_action_keys(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), markers_selectkeys_between(), poselib_apply_pose(), region_select_action_keys(), sethandles_action_keys(), and sethandles_graph_keys().
void ANIM_editkeyframes_refresh | ( | struct bAnimContext * | ac | ) |
Functions for making sure all keyframes are in good order.
Definition at line 458 of file keyframes_edit.c.
References ANIM_animdata_filter(), ANIM_animdata_freelist(), ANIM_animdata_update(), ANIM_UPDATE_DEPS, ANIM_UPDATE_HANDLES, ANIM_UPDATE_ORDER, ANIMFILTER_DATA_VISIBLE, bAnimContext::data, bAnimContext::datatype, filter(), ListBase::first, bAnimListElem::next, NULL, and bAnimListElem::update.
Referenced by special_aftertrans_update__actedit(), and special_aftertrans_update__graph().
KeyframeEditFunc ANIM_editkeyframes_select | ( | short | mode | ) |
Definition at line 1559 of file keyframes_edit.c.
References SELECT_ADD, select_bezier_add(), select_bezier_invert(), select_bezier_subtract(), SELECT_INVERT, and SELECT_SUBTRACT.
Referenced by actkeys_mselect_channel_only(), actkeys_mselect_column(), actkeys_mselect_single(), actkeys_select_leftright(), actkeys_select_linked_exec(), box_select_action(), box_select_graphcurves(), box_select_graphkeys(), columnselect_action_keys(), columnselect_graph_keys(), deselect_action_keys(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), markers_selectkeys_between(), mouse_graph_keys(), and region_select_action_keys().
KeyframeEditFunc ANIM_editkeyframes_snap | ( | short | mode | ) |
Definition at line 882 of file keyframes_edit.c.
References snap_bezier_cframe(), snap_bezier_horizontal(), snap_bezier_nearest(), snap_bezier_nearestsec(), snap_bezier_nearmarker(), snap_bezier_time(), snap_bezier_value(), SNAP_KEYS_CURFRAME, SNAP_KEYS_HORIZONTAL, SNAP_KEYS_NEARFRAME, SNAP_KEYS_NEARMARKER, SNAP_KEYS_NEARSEC, SNAP_KEYS_TIME, and SNAP_KEYS_VALUE.
Referenced by snap_action_keys(), and snap_graph_keys().
void ANIM_fcurve_equalize_keyframes_loop | ( | struct 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.
handle_length | Desired handle length, must be positive. |
flatten | Makes the keyframes' handles the same value as the keyframe, flattening the curve at that point. |
Definition at line 1288 of file keyframes_edit.c.
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, SELECT, and BezTriple::vec.
Referenced by equalize_graph_keys().
short ANIM_fcurve_keyframes_loop | ( | KeyframeEditData * | ked, |
struct 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 55 of file keyframes_edit.c.
References FCurve::bezt, KeyframeEditData::curflags, KeyframeEditData::curIndex, ELEM, KeyframeEditData::fcu, and NULL.
Referenced by act_keyframes_loop(), actkeys_framejump_exec(), actkeys_mselect_column(), actkeys_select_leftright(), actkeys_select_linked_exec(), agrp_keyframes_loop(), ANIM_animchannel_keyframes_loop(), ANIM_animchanneldata_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(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), markers_selectkeys_between(), mirror_action_keys(), mirror_graph_keys(), mouse_graph_keys(), 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().
Definition at line 730 of file keyframes_general.c.
References animcopy_firstframe, animcopy_lastframe, animcopybuf, tAnimCopybufItem::bezt, BLI_freelinkN(), BLI_listbase_clear(), ListBase::first, MEM_freeN, tAnimCopybufItem::next, and tAnimCopybufItem::rna_path.
Referenced by copy_action_keys(), copy_animedit_keys(), copy_graph_keys(), and WM_exit_ex().
short bezt_calc_average | ( | KeyframeEditData * | ked, |
struct BezTriple * | bezt | ||
) |
Used to calculate the average location of all relevant BezTriples by summing their locations.
Definition at line 760 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().
void bezt_remap_times | ( | KeyframeEditData * | ked, |
struct BezTriple * | bezt | ||
) |
Used to remap times from one range to another. requires: ked->custom = KeyframeEditCD_Remap
.
Definition at line 792 of file keyframes_edit.c.
References KeyframeEditData::data, KeyframeEditCD_Remap::newMax, KeyframeEditCD_Remap::newMin, KeyframeEditCD_Remap::oldMax, KeyframeEditCD_Remap::oldMin, and BezTriple::vec.
short bezt_selmap_flush | ( | KeyframeEditData * | ked, |
struct 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 1676 of file keyframes_edit.c.
References BEZT_DESEL_ALL, BEZT_SEL_ALL, KeyframeEditData::curIndex, KeyframeEditData::data, and map.
Referenced by select_moreless_action_keys(), and select_moreless_graph_keys().
short bezt_to_cfraelem | ( | KeyframeEditData * | ked, |
struct BezTriple * | bezt | ||
) |
Used to extract a set of cfra-elems from the keyframes.
Definition at line 779 of file keyframes_edit.c.
References BLI_addtail(), CfraElem::cfra, BezTriple::f2, KeyframeEditData::list, MEM_callocN, SELECT, and BezTriple::vec.
Referenced by columnselect_action_keys(), and columnselect_graph_keys().
void blend_to_default_fcurve | ( | struct PointerRNA * | id_ptr, |
struct FCurve * | fcu, | ||
float | factor | ||
) |
Definition at line 358 of file keyframes_general.c.
References FCurve::bezt, BezTriple::f2, get_default_rna_value(), interpf(), ptr, FCurve::rna_path, RNA_path_resolve_property(), SELECT, FCurve::totvert, and BezTriple::vec.
Referenced by blend_to_default_graph_keys().
void blend_to_neighbor_fcurve_segment | ( | struct FCurve * | fcu, |
struct FCurveSegment * | segment, | ||
float | factor | ||
) |
Definition at line 299 of file keyframes_general.c.
References FCurve::bezt, fabs(), fcurve_segment_end_get(), fcurve_segment_start_get(), interpf(), and BezTriple::vec.
Referenced by blend_to_neighbor_graph_keys().
void breakdown_fcurve_segment | ( | struct FCurve * | fcu, |
struct FCurveSegment * | segment, | ||
float | factor | ||
) |
Definition at line 380 of file keyframes_general.c.
References FCurve::bezt, fcurve_segment_end_get(), fcurve_segment_start_get(), interpf(), and BezTriple::vec.
Referenced by breakdown_graph_keys().
void clean_fcurve | ( | struct bAnimContext * | ac, |
struct bAnimListElem * | ale, | ||
float | thresh, | ||
bool | cleardefault | ||
) |
Definition at line 89 of file keyframes_general.c.
References bAnimListElem::adt, ANIM_fcurve_delete_from_animdata(), FCurve::array_index, FCurve::bezt, BKE_fcurve_delete_keys_all(), BKE_fcurve_is_empty(), BezTriple::f1, bAnimListElem::id, if(), insert_bezt_fcurve(), IS_EQT, bAnimListElem::key_data, MEM_freeN, next, NULL, blender::meshintersect::prev(), PROP_FLOAT, ptr, RNA_id_pointer_create(), FCurve::rna_path, RNA_path_resolve_property(), RNA_property_float_get_default_index(), RNA_property_type(), SELECT, FCurve::totvert, and BezTriple::vec.
Referenced by clean_action_keys(), and clean_graph_keys().
short copy_animedit_keys | ( | struct bAnimContext * | ac, |
ListBase * | anim_data | ||
) |
Definition at line 760 of file keyframes_general.c.
References ANIM_editkeyframes_ok(), ANIM_fcurve_keyframes_loop(), ANIM_fcurves_copybuf_free(), animcopy_cfra, animcopy_firstframe, animcopy_lastframe, animcopybuf, FCurve::array_index, tAnimCopybufItem::bezt, FCurve::bezt, BEZT_ISSEL_ANY, BEZT_OK_SELECTED, BEZT_SEL_ALL, BKE_pose_channel_find_name(), BLI_addtail(), BLI_str_quoted_substr(), RenderData::cfra, ELEM, ListBase::first, FCurve::grp, GS, bAnimListElem::id, Object::id, ID_OB, if(), bAnimListElem::key_data, ListBase::last, MEM_callocN, MEM_dupallocN, MEM_freeN, ID::name, bAnimListElem::next, NULL, OB_ARMATURE, Object::pose, Scene::r, FCurve::rna_path, scene, bAnimContext::scene, tAnimCopybufItem::totvert, and BezTriple::vec.
Referenced by copy_action_keys(), and copy_graph_keys().
bool decimate_fcurve | ( | struct bAnimListElem * | ale, |
float | remove_ratio, | ||
float | error_sq_max | ||
) |
Definition at line 463 of file keyframes_general.c.
References FCurve::bezt, BEZT_FLAG_IGNORE_TAG, BEZT_FLAG_TEMP_TAG, BLI_freelistN(), decimate_fcurve_segment(), BezTriple::f2, find_fcurve_segments(), if(), insert_bezt_fcurve(), bAnimListElem::key_data, LISTBASE_FOREACH, MEM_freeN, NULL, prepare_for_decimate(), and FCurve::totvert.
Referenced by decimate_graph_keys().
Definition at line 51 of file keyframes_general.c.
References FCurve::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, ELEM, BezTriple::f2, MEM_callocN, MEM_freeN, NULL, SELECT, and FCurve::totvert.
Referenced by duplicate_action_keys(), and duplicate_graph_keys().
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 267 of file keyframes_general.c.
References BLI_addtail(), find_fcurve_segment(), MEM_callocN, and NULL.
Referenced by blend_to_neighbor_graph_keys(), breakdown_graph_keys(), and decimate_fcurve().
float get_default_rna_value | ( | struct FCurve * | fcu, |
struct PropertyRNA * | prop, | ||
struct PointerRNA * | ptr | ||
) |
Definition at line 318 of file keyframes_general.c.
References FCurve::array_index, len, PROP_BOOLEAN, PROP_FLOAT, PROP_INT, ptr, RNA_property_array_length(), RNA_property_boolean_get_default(), RNA_property_boolean_get_default_index(), RNA_property_float_get_default(), RNA_property_float_get_default_index(), RNA_property_int_get_default(), RNA_property_int_get_default_index(), and RNA_property_type().
Referenced by blend_to_default_fcurve().
bool keyframe_region_circle_test | ( | const KeyframeEdit_CircleData * | data_circle, |
const float | xy[2] | ||
) |
Definition at line 659 of file keyframes_edit.c.
References BLI_rctf_isect_pt_v(), BLI_rctf_transform_pt_v(), len_squared_v2(), KeyframeEdit_CircleData::mval, KeyframeEdit_CircleData::radius_squared, KeyframeEdit_CircleData::rectf_scaled, KeyframeEdit_CircleData::rectf_view, and xy.
Referenced by ED_gpencil_layer_frames_select_region(), ED_masklayer_frames_select_region(), and ok_bezier_channel_circle().
bool keyframe_region_lasso_test | ( | const KeyframeEdit_LassoData * | data_lasso, |
const float | xy[2] | ||
) |
Definition at line 599 of file keyframes_edit.c.
References BLI_lasso_is_point_inside(), BLI_rctf_isect_pt_v(), BLI_rctf_transform_pt_v(), KeyframeEdit_LassoData::mcoords, KeyframeEdit_LassoData::mcoords_len, KeyframeEdit_LassoData::rectf_scaled, KeyframeEdit_LassoData::rectf_view, and xy.
Referenced by ED_gpencil_layer_frames_select_region(), ED_masklayer_frames_select_region(), and ok_bezier_channel_lasso().
eKeyPasteError paste_animedit_keys | ( | struct bAnimContext * | ac, |
ListBase * | anim_data, | ||
eKeyPasteOffset | offset_mode, | ||
eKeyMergeMode | merge_mode, | ||
bool | flip | ||
) |
Definition at line 1150 of file keyframes_general.c.
References ANIM_animdata_update(), ANIM_nla_mapping_apply_fcurve(), ANIM_nla_mapping_get(), ANIM_UPDATE_DEFAULT, animcopy_cfra, animcopy_firstframe, animcopy_lastframe, animcopybuf, BLI_listbase_is_empty(), BLI_listbase_is_single(), bAnimContext::bmain, RenderData::cfra, bAnimListElem::data, ListBase::first, float(), bAnimListElem::key_data, KEYFRAME_PASTE_NOTHING_TO_PASTE, KEYFRAME_PASTE_NOWHERE_TO_PASTE, KEYFRAME_PASTE_OFFSET_CFRA_END, KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, KEYFRAME_PASTE_OFFSET_CFRA_START, KEYFRAME_PASTE_OFFSET_NONE, KEYFRAME_PASTE_OK, bAnimListElem::next, NULL, offset, paste_animedit_keys_fcurve(), pastebuf_match_index_only(), pastebuf_match_path_full(), pastebuf_match_path_property(), Scene::r, scene, bAnimContext::scene, and bAnimListElem::update.
Referenced by paste_action_keys(), and paste_graph_keys().
Definition at line 622 of file keyframes_general.c.
References FCurve::bezt, BEZT_ISSEL_ANY, BEZT_KEYTYPE_BREAKDOWN, BKE_fcurve_handles_recalc(), ceil(), evaluate_fcurve(), float(), blender::math::floor(), insert_vert_fcurve(), MEM_callocN, MEM_freeN, next, NULL, and BezTriple::vec.
Referenced by sample_action_keys(), and sample_graph_keys().
Use a weighted moving-means method to reduce intensity of fluctuations.
Definition at line 519 of file keyframes_general.c.
References FCurve::bezt, BEZT_ISSEL_ANY, BKE_fcurve_handles_recalc(), ELEM, tSmooth_Bezt::h1, tSmooth_Bezt::h2, tSmooth_Bezt::h3, MEM_callocN, MEM_freeN, NULL, FCurve::totvert, BezTriple::vec, x, tSmooth_Bezt::y1, tSmooth_Bezt::y2, and tSmooth_Bezt::y3.
Referenced by graphkeys_smooth_exec().