|
Blender V5.0
|
#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) |
| using FcuEditFunc = void (*)(FCurve *fcu) |
Callback function that refreshes the F-Curve after use.
Definition at line 219 of file ED_keyframes_edit.hh.
| 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.
| Enumerator | |
|---|---|
| EQUALIZE_HANDLES_LEFT | |
| EQUALIZE_HANDLES_RIGHT | |
| EQUALIZE_HANDLES_BOTH | |
Definition at line 87 of file ED_keyframes_edit.hh.
| 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.
| Enumerator | |
|---|---|
| SELECT_REPLACE | |
| SELECT_ADD | |
| SELECT_SUBTRACT | |
| SELECT_INVERT | |
| SELECT_EXTEND_RANGE | |
Definition at line 57 of file ED_keyframes_edit.hh.
| Enumerator | |
|---|---|
| SELMAP_MORE | |
| SELMAP_LESS | |
Definition at line 70 of file ED_keyframes_edit.hh.
| 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 76 of file ED_keyframes_edit.hh.
bezt validation.
Definition at line 34 of file ED_keyframes_edit.hh.
| enum 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.
| enum 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.
| enum eKeyMergeMode |
Definition at line 260 of file ED_keyframes_edit.hh.
| enum 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.
| enum eKeyPasteOffset |
Paste options.
Definition at line 236 of file ED_keyframes_edit.hh.
| enum eKeyPasteValueOffset |
Definition at line 247 of file ED_keyframes_edit.hh.
|
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.
| enum tShearDirection |
| Enumerator | |
|---|---|
| SHEAR_FROM_LEFT | |
| SHEAR_FROM_RIGHT | |
Definition at line 483 of file ED_keyframes_edit.hh.
| short ANIM_animchannel_keyframes_loop | ( | KeyframeEditData * | ked, |
| bDopeSheet * | ads, | ||
| 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 407 of file keyframes_edit.cc.
References action_layered_keyframes_loop(), action_legacy_keyframes_loop(), bAnimListElem::adt, agrp_keyframes_loop(), ALE_ACT, ALE_ACTION_LAYERED, ALE_ACTION_SLOT, ALE_ALL, ALE_FCURVE, ALE_GPFRAME, ALE_GREASE_PENCIL_CEL, ALE_GREASE_PENCIL_DATA, ALE_GREASE_PENCIL_GROUP, ALE_GROUP, ALE_MASKLAY, ALE_NLASTRIP, ALE_NONE, ALE_OB, ALE_SCE, ANIM_fcurve_keyframes_loop(), BLI_assert, bAnimListElem::data, bAnimListElem::datatype, bAnimListElem::key_data, ob_keyframes_loop(), scene_keyframes_loop(), blender::animrig::Action::slot_for_handle(), AnimData::slot_handle, summary_keyframes_loop(), and wrap().
Referenced by actkeys_mselect_channel_only(), actkeys_mselect_single(), box_select_elem(), and region_select_elem().
| 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().
| 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().
| KeyframeEditFunc ANIM_editkeyframes_easing | ( | short | mode | ) |
Definition at line 1543 of file keyframes_edit.cc.
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 1201 of file keyframes_edit.cc.
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 1397 of file keyframes_edit.cc.
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 | ( | eBezTriple_KeyframeType | keyframe_type | ) |
Definition at line 1483 of file keyframes_edit.cc.
References BEZT_KEYTYPE_BREAKDOWN, BEZT_KEYTYPE_EXTREME, BEZT_KEYTYPE_GENERATED, BEZT_KEYTYPE_JITTER, BEZT_KEYTYPE_KEYFRAME, BEZT_KEYTYPE_MOVEHOLD, BLI_assert_unreachable, set_keytype_breakdown(), set_keytype_extreme(), set_keytype_generated(), 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 1044 of file keyframes_edit.cc.
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 761 of file keyframes_edit.cc.
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_SELECTED_KEY, BEZT_OK_VALUE, BEZT_OK_VALUERANGE, 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_selected_key(), 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(), deselect_graph_keys(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), markers_selectkeys_between(), markers_selectkeys_between(), region_select_action_keys(), sethandles_action_keys(), and sethandles_graph_keys().
| void ANIM_editkeyframes_refresh | ( | bAnimContext * | ac | ) |
Functions for making sure all keyframes are in good order.
Definition at line 498 of file keyframes_edit.cc.
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, and LISTBASE_FOREACH.
Referenced by blender::ed::transform::special_aftertrans_update__actedit(), and blender::ed::transform::special_aftertrans_update__graph().
| KeyframeEditFunc ANIM_editkeyframes_select | ( | eEditKeyframes_Select | selectmode | ) |
Definition at line 1622 of file keyframes_edit.cc.
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(), deselect_graph_keys(), graphkeys_mselect_column(), graphkeys_select_leftright(), graphkeys_select_linked_exec(), markers_selectkeys_between(), markers_selectkeys_between(), mouse_graph_keys(), and region_select_action_keys().
| KeyframeEditFunc ANIM_editkeyframes_snap | ( | short | mode | ) |
Definition at line 938 of file keyframes_edit.cc.
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 | ( | 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 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().
| 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().
| void ANIM_fcurves_copybuf_free | ( | ) |
Free the copy-paste buffer.
Definition at line 1353 of file keyframes_general.cc.
References blender::ed::animation::keyframe_copy_buffer.
Referenced by ANIM_fcurves_copybuf_reset(), blender::ed::animation::tests::keyframes_paste::TearDownTestSuite(), and WM_exit_ex().
| void ANIM_fcurves_copybuf_reset | ( | ) |
Clear the copy-paste buffer.
Normally this is not necessary, as copy_animedit_keys() will do this for you.
Definition at line 1346 of file keyframes_general.cc.
References ANIM_fcurves_copybuf_free(), and blender::ed::animation::keyframe_copy_buffer.
Referenced by copy_animedit_keys(), blender::ed::animation::tests::keyframes_paste::SetUpTestSuite(), blender::ed::animation::tests::TEST_F(), blender::ed::animation::tests::TEST_F(), and blender::ed::animation::tests::TEST_F().
| 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().
| 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.
| 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().
| short bezt_to_cfraelem | ( | KeyframeEditData * | ked, |
| BezTriple * | bezt ) |
Used to extract a set of cfra-elems from the keyframes.
Definition at line 825 of file keyframes_edit.cc.
References ANIM_nla_tweakedit_remap(), BLI_addtail(), CfraElem::cfra, KeyframeEditData::data, BezTriple::f2, KeyframeEditData::list, MEM_callocN(), NLATIME_CONVERT_MAP, SELECT, and BezTriple::vec.
Referenced by columnselect_action_keys(), and columnselect_graph_keys().
| 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.
| factor | blend 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().
| 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().
| void blend_to_ease_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 772 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, IS_EQF, s_curve(), BezTriple::vec, and x.
Referenced by blend_to_ease_graph_keys().
| void blend_to_neighbor_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 319 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, interpf(), and BezTriple::vec.
Referenced by blend_to_neighbor_graph_keys().
| void breakdown_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 995 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, interpf(), and BezTriple::vec.
Referenced by breakdown_graph_keys().
| 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 ) |
| samples | Are 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().
| void clean_fcurve | ( | bAnimListElem * | ale, |
| float | thresh, | ||
| bool | cleardefault, | ||
| bool | only_selected_keys ) |
Definition at line 99 of file keyframes_general.cc.
References bAnimListElem::adt, blender::animrig::animdata_fcurve_delete(), FCurve::array_index, FCurve::bezt, BKE_fcurve_delete_keys_all(), BKE_fcurve_is_empty(), BezTriple::f1, BezTriple::f2, BezTriple::f3, i, bAnimListElem::id, blender::animrig::insert_bezt_fcurve(), IS_EQT, bAnimListElem::key_data, MEM_freeN(), next, 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().
| bool copy_animedit_keys | ( | bAnimContext * | ac, |
| ListBase * | anim_data ) |
Copy animation keys into the copy buffer.
Definition at line 1488 of file keyframes_general.cc.
References ALE_FCURVE, ANIM_editkeyframes_ok(), ANIM_fcurve_keyframes_loop(), ANIM_fcurves_copybuf_reset(), FCurve::array_index, FCurve::bezt, BEZT_ISSEL_IDX, BEZT_OK_SELECTED_KEY, BKE_fcurve_create(), BLI_assert, BLI_strdup(), RenderData::cfra, blender::animrig::Channelbag::channel_group_ensure(), bAnimListElem::datatype, blender::animrig::Channelbag::fcurve_append(), blender::animrig::Channelbag::fcurve_assign_to_channel_group(), FCurve::grp, blender::animrig::insert_bezt_fcurve(), INSERTKEY_FAST, INSERTKEY_OVERWRITE_FULL, is_animating_bone(), bAnimListElem::key_data, blender::ed::animation::keyframe_copy_buffer, LISTBASE_FOREACH, bActionGroup::name, Scene::r, FCurve::rna_path, bAnimContext::scene, FCurve::totvert, and BezTriple::vec.
Referenced by copy_action_keys(), and copy_graph_keys().
| bool decimate_fcurve | ( | bAnimListElem * | ale, |
| float | remove_ratio, | ||
| float | error_sq_max ) |
Definition at line 1086 of file keyframes_general.cc.
References FCurve::bezt, BEZT_FLAG_IGNORE_TAG, BEZT_FLAG_TEMP_TAG, BLI_freelistN(), decimate_fcurve_segment(), BezTriple::f2, find_fcurve_segments(), i, blender::animrig::insert_bezt_fcurve(), bAnimListElem::key_data, LISTBASE_FOREACH, MEM_freeN(), prepare_for_decimate(), and FCurve::totvert.
Referenced by decimate_graph_keys().
| bool duplicate_fcurve_keys | ( | FCurve * | fcu | ) |
Definition at line 60 of file keyframes_general.cc.
References FCurve::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, ELEM, BezTriple::f2, i, MEM_calloc_arrayN(), MEM_freeN(), SELECT, and FCurve::totvert.
Referenced by duplicate_action_keys(), and duplicate_graph_keys().
| 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().
| ButterworthCoefficients * ED_anim_allocate_butterworth_coefficients | ( | const int | filter_order | ) |
Definition at line 425 of file keyframes_general.cc.
References ButterworthCoefficients::A, ButterworthCoefficients::d1, ButterworthCoefficients::d2, ButterworthCoefficients::filter_order, MEM_calloc_arrayN(), and MEM_callocN().
Referenced by btw_smooth_allocate_operator_data(), and btw_smooth_graph_keys().
| void ED_anim_calculate_butterworth_coefficients | ( | float | cutoff_frequency, |
| float | sampling_frequency, | ||
| ButterworthCoefficients * | bw_coeff ) |
Definition at line 444 of file keyframes_general.cc.
References ButterworthCoefficients::A, ButterworthCoefficients::d1, ButterworthCoefficients::d2, ButterworthCoefficients::filter_order, i, M_PI, sin, and tan.
Referenced by btw_smooth_graph_keys(), and btw_smooth_modal_update().
| void ED_anim_free_butterworth_coefficients | ( | ButterworthCoefficients * | bw_coeff | ) |
Definition at line 436 of file keyframes_general.cc.
References ButterworthCoefficients::A, ButterworthCoefficients::d1, ButterworthCoefficients::d2, and MEM_freeN().
Referenced by btw_smooth_free_operator_data(), and btw_smooth_graph_keys().
| 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.
| sigma | The shape of the gauss distribution. |
| kernel_size | How 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().
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().
| float get_default_rna_value | ( | const FCurve * | fcu, |
| PropertyRNA * | prop, | ||
| PointerRNA * | ptr ) |
Definition at line 339 of file keyframes_general.cc.
References FCurve::array_index, float, 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 702 of file keyframes_edit.cc.
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(), ok_bezier_channel_circle(), ok_bezier_region_circle(), and blender::ed::greasepencil::select_frames_region().
| bool keyframe_region_lasso_test | ( | const KeyframeEdit_LassoData * | data_lasso, |
| const float | xy[2] ) |
Definition at line 643 of file keyframes_edit.cc.
References BLI_lasso_is_point_inside(), BLI_rctf_isect_pt_v(), BLI_rctf_transform_pt_v(), KeyframeEdit_LassoData::mcoords, KeyframeEdit_LassoData::rectf_scaled, KeyframeEdit_LassoData::rectf_view, and xy.
Referenced by ED_gpencil_layer_frames_select_region(), ED_masklayer_frames_select_region(), ok_bezier_channel_lasso(), ok_bezier_region_lasso(), and blender::ed::greasepencil::select_frames_region().
| bool match_slope_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 821 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, FCurve::totvert, and BezTriple::vec.
Referenced by match_slope_graph_keys().
| eKeyPasteError paste_animedit_keys | ( | bAnimContext * | ac, |
| ListBase * | anim_data, | ||
| const KeyframePasteContext & | paste_context ) |
Definition at line 2117 of file keyframes_general.cc.
References ANIM_animdata_update(), ANIM_nla_mapping_apply_if_needed_fcurve(), ANIM_UPDATE_DEFAULT, BLI_listbase_is_empty(), BLI_listbase_is_single(), bAnimContext::bmain, RenderData::cfra, bAnimListElem::data, ListBase::first, KeyframePasteContext::flip, float, blender::ed::animation::keyframe_copy_buffer, 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, LISTBASE_FOREACH, KeyframePasteContext::merge_mode, KeyframePasteContext::offset_mode, blender::ed::animation::paste_animedit_keys_fcurve(), paste_get_y_offset(), blender::ed::animation::pastebuf_find_matching_copybuf_item(), blender::ed::animation::pastebuf_match_index_only(), blender::ed::animation::pastebuf_match_path_full(), blender::ed::animation::pastebuf_match_path_property(), Scene::r, bAnimContext::scene, bAnimListElem::update, and KeyframePasteContext::value_offset_mode.
Referenced by paste_action_keys(), and paste_graph_keys().
| void push_pull_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 909 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, IS_EQF, and BezTriple::vec.
Referenced by push_pull_graph_keys().
| void scale_average_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 401 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), i, interpf(), BezTriple::vec, and y.
Referenced by scale_average_graph_keys().
| void scale_from_fcurve_segment_neighbor | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor, | ||
| FCurveSegmentAnchor | anchor ) |
Definition at line 972 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, interpf(), LEFT, RIGHT, and BezTriple::vec.
Referenced by scale_from_neighbor_graph_keys().
| void shear_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor, | ||
| tShearDirection | direction ) |
Definition at line 873 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), i, IS_EQF, SHEAR_FROM_LEFT, and BezTriple::vec.
Referenced by shear_graph_keys().
| void smooth_fcurve | ( | FCurve * | fcu | ) |
Use a weighted moving-means method to reduce intensity of fluctuations.
Definition at line 1146 of file keyframes_general.cc.
References FCurve::bezt, BEZT_ISSEL_ANY, BKE_fcurve_handles_recalc(), ELEM, tSmooth_Bezt::h1, tSmooth_Bezt::h2, tSmooth_Bezt::h3, i, MEM_calloc_arrayN(), MEM_freeN(), FCurve::totvert, BezTriple::vec, x, tSmooth_Bezt::y1, tSmooth_Bezt::y2, and tSmooth_Bezt::y3.
Referenced by graphkeys_smooth_exec().
| 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 ) |
Definition at line 636 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), clamp_i(), i, interpf(), MEM_dupallocN(), MEM_freeN(), round, signum_i(), and BezTriple::vec.
Referenced by gaussian_smooth_graph_keys(), and gaussian_smooth_modal_update().
| void time_offset_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | frame_offset ) |
Definition at line 938 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), evaluate_fcurve(), floored_fmod(), floorf, i, MEM_calloc_arrayN(), MEM_freeN(), FCurve::totvert, and BezTriple::vec.
Referenced by time_offset_graph_keys().