|
Blender V4.3
|
#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 |
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 208 of file ED_keyframes_edit.hh.
| using KeyframeEditFunc = short (*)(KeyframeEditData *ked, BezTriple *bezt) |
Callback function that operates on the given BezTriple.
Definition at line 210 of file ED_keyframes_edit.hh.
| Enumerator | |
|---|---|
| EQUALIZE_HANDLES_LEFT | |
| EQUALIZE_HANDLES_RIGHT | |
| EQUALIZE_HANDLES_BOTH | |
Definition at line 85 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 92 of file ED_keyframes_edit.hh.
| Enumerator | |
|---|---|
| SELECT_REPLACE | |
| SELECT_ADD | |
| SELECT_SUBTRACT | |
| SELECT_INVERT | |
| SELECT_EXTEND_RANGE | |
Definition at line 55 of file ED_keyframes_edit.hh.
| Enumerator | |
|---|---|
| SELMAP_MORE | |
| SELMAP_LESS | |
Definition at line 68 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 74 of file ED_keyframes_edit.hh.
bezt validation.
| 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 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 | |
Definition at line 137 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 124 of file ED_keyframes_edit.hh.
| enum eKeyMergeMode |
Definition at line 249 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 261 of file ED_keyframes_edit.hh.
| enum eKeyPasteOffset |
Paste options.
Definition at line 225 of file ED_keyframes_edit.hh.
| enum eKeyPasteValueOffset |
Definition at line 236 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 444 of file ED_keyframes_edit.hh.
| enum tShearDirection |
| Enumerator | |
|---|---|
| SHEAR_FROM_LEFT | |
| SHEAR_FROM_RIGHT | |
Definition at line 485 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 408 of file keyframes_edit.cc.
References 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().
| short ANIM_animchanneldata_keyframes_loop | ( | KeyframeEditData * | ked, |
| bDopeSheet * | ads, | ||
| void * | data, | ||
| int | keytype, | ||
| KeyframeEditFunc | key_ok, | ||
| KeyframeEditFunc | key_cb, | ||
| FcuEditFunc | fcu_cb ) |
Same as ANIM_animchannel_keyframes_loop, except bAnimListElem wrapper is not needed.
| keytype | is eAnim_KeyType. |
Definition at line 477 of file keyframes_edit.cc.
References action_legacy_keyframes_loop(), agrp_keyframes_loop(), ALE_ACT, ALE_ACTION_LAYERED, ALE_ACTION_SLOT, ALE_ALL, ALE_FCURVE, ALE_GROUP, ALE_OB, ALE_SCE, ANIM_fcurve_keyframes_loop(), ob_keyframes_loop(), scene_keyframes_loop(), and summary_keyframes_loop().
Referenced by nlaedit_apply_scale_exec().
| 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 519 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, 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 1749 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 1559 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 1217 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 1413 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 1499 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 1060 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 789 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_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_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 544 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 special_aftertrans_update__actedit(), and special_aftertrans_update__graph().
| KeyframeEditFunc ANIM_editkeyframes_select | ( | eEditKeyframes_Select | selectmode | ) |
Definition at line 1646 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 954 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 1360 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, SELECT, FCurve::totvert, 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 61 of file keyframes_edit.cc.
References FCurve::bezt, KeyframeEditData::curflags, KeyframeEditData::curIndex, ELEM, KeyframeEditData::fcu, KEYFRAME_NONE, and FCurve::totvert.
Referenced by 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_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(), 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(), 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 | ( | ) |
Definition at line 1259 of file keyframes_general.cc.
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, |
| BezTriple * | bezt ) |
Used to calculate the average location of all relevant BezTriples by summing their locations.
Definition at line 831 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 863 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 1763 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 850 of file keyframes_edit.cc.
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_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 706 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fabs(), fcurve_segment_end_get(), fcurve_segment_start_get(), 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 374 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), 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_ease_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 752 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), IS_EQF, s_curve(), and BezTriple::vec.
Referenced by blend_to_ease_graph_keys().
| void blend_to_neighbor_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 316 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fabs(), fcurve_segment_end_get(), fcurve_segment_start_get(), interpf(), and BezTriple::vec.
Referenced by blend_to_neighbor_graph_keys().
| void breakdown_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 976 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), 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 517 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), butterworth_calculate_blend_value(), butterworth_filter_value(), double(), ButterworthCoefficients::filter_order, float, int, interpf(), MEM_callocN, MEM_freeN(), min_ff(), min_ii(), and BezTriple::vec.
Referenced by btw_smooth_graph_keys(), and btw_smooth_modal_update().
| void clean_fcurve | ( | bAnimContext * | ac, |
| bAnimListElem * | ale, | ||
| float | thresh, | ||
| bool | cleardefault, | ||
| bool | only_selected_keys ) |
Definition at line 95 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, 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().
| short copy_animedit_keys | ( | bAnimContext * | ac, |
| ListBase * | anim_data ) |
Definition at line 1289 of file keyframes_general.cc.
References ANIM_editkeyframes_ok(), ANIM_fcurve_keyframes_loop(), ANIM_fcurves_copybuf_free(), animcopy_cfra, animcopy_firstframe, animcopy_lastframe, animcopybuf, FCurve::array_index, tAnimCopybufItem::array_index, FCurve::bezt, tAnimCopybufItem::bezt, BEZT_ISSEL_ANY, BEZT_OK_SELECTED, BEZT_SEL_ALL, BKE_pose_channel_find_name(), BLI_addtail(), BLI_str_quoted_substr(), ELEM, ListBase::first, FCurve::grp, tAnimCopybufItem::grp, GS, tAnimCopybufItem::id, ID_OB, tAnimCopybufItem::id_type, tAnimCopybufItem::is_bone, ListBase::last, LISTBASE_FOREACH, MEM_callocN, MEM_dupallocN, MEM_freeN(), bPoseChannel::name, OB_ARMATURE, Object::pose, FCurve::rna_path, tAnimCopybufItem::rna_path, bAnimContext::scene, FCurve::totvert, tAnimCopybufItem::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 1067 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(), 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 55 of file keyframes_general.cc.
References FCurve::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, ELEM, BezTriple::f2, MEM_callocN, 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 669 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(), IS_EQF, and BezTriple::vec.
Referenced by ease_graph_keys().
| ButterworthCoefficients * ED_anim_allocate_butterworth_coefficients | ( | const int | filter_order | ) |
Definition at line 422 of file keyframes_general.cc.
References ButterworthCoefficients::A, ButterworthCoefficients::d1, ButterworthCoefficients::d2, ButterworthCoefficients::filter_order, 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 443 of file keyframes_general.cc.
References ButterworthCoefficients::A, ButterworthCoefficients::d1, ButterworthCoefficients::d2, double(), ButterworthCoefficients::filter_order, and M_PI.
Referenced by btw_smooth_graph_keys(), and btw_smooth_modal_update().
| void ED_anim_free_butterworth_coefficients | ( | ButterworthCoefficients * | bw_coeff | ) |
Definition at line 435 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().
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 609 of file keyframes_general.cc.
References BLI_assert, double(), exp(), 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 278 of file keyframes_general.cc.
References FCurve::bezt, BLI_addtail(), find_fcurve_segment(), MEM_callocN, and FCurveSegment::start_index.
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 336 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 730 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 671 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 801 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fabs(), fcurve_segment_end_get(), fcurve_segment_start_get(), FCurve::totvert, and BezTriple::vec.
Referenced by match_slope_graph_keys().
| eKeyPasteError paste_animedit_keys | ( | bAnimContext * | ac, |
| ListBase * | anim_data, | ||
| eKeyPasteOffset | offset_mode, | ||
| eKeyPasteValueOffset | value_offset_mode, | ||
| eKeyMergeMode | merge_mode, | ||
| bool | flip ) |
Definition at line 1761 of file keyframes_general.cc.
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, 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, LISTBASE_FOREACH, paste_animedit_keys_fcurve(), paste_get_y_offset(), pastebuf_match_index_only(), pastebuf_match_path_full(), pastebuf_match_path_property(), bAnimContext::scene, and bAnimListElem::update.
Referenced by paste_action_keys(), and paste_graph_keys().
| void push_pull_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor ) |
Definition at line 889 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), 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 398 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), interpf(), and BezTriple::vec.
Referenced by scale_average_graph_keys().
| void scale_from_fcurve_segment_neighbor | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float | factor, | ||
| FCurveSegmentAnchor | anchor ) |
Definition at line 953 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), 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 853 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), fcurve_segment_end_get(), fcurve_segment_start_get(), 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 1127 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, MEM_callocN, MEM_freeN(), FCurve::totvert, BezTriple::vec, tSmooth_Bezt::y1, tSmooth_Bezt::y2, and tSmooth_Bezt::y3.
Referenced by graphkeys_smooth_exec().
| void smooth_fcurve_segment | ( | FCurve * | fcu, |
| FCurveSegment * | segment, | ||
| float * | samples, | ||
| float | factor, | ||
| int | kernel_size, | ||
| double * | kernel ) |
Definition at line 635 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), interpf(), 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 918 of file keyframes_general.cc.
References FCurve::bezt, BKE_fcurve_keyframe_move_value_with_handles(), evaluate_fcurve(), floored_fmod(), floorf, MEM_callocN, MEM_freeN(), FCurve::totvert, and BezTriple::vec.
Referenced by time_offset_graph_keys().