17# include <AUD_Special.h>
33#include "RNA_prototypes.hh"
84 "Insert a keyframe on all visible and editable F-Curves using each curve's current value"},
88 "Only Selected Channels",
89 "Insert a keyframe on selected F-Curves using each curve's current value"},
93 "Only Active F-Curve",
94 "Insert a keyframe on the active F-Curve using the curve's current value"},
98 "Active Channels at Cursor",
99 "Insert a keyframe for the active F-Curve at the cursor point"},
103 "Selected Channels at Cursor",
104 "Insert a keyframe for selected F-Curves at the cursor point"},
105 {0,
nullptr, 0,
nullptr,
nullptr},
112 ListBase anim_data = {
nullptr,
nullptr};
133 if (num_items == 0) {
137 "No active F-Curve to add a keyframe to. Select an editable F-Curve first");
162 ac->
scene, ale->
id,
static_cast<FCurve *
>(ale->key_data), mapping_flag, &offset);
206 const std::optional<blender::StringRefNull> channel_group = fcu->
grp ? std::optional(
209 if (ale->id && !ale->owner && !fcu->
driver) {
214 {{fcu->rna_path, {}, fcu->array_index}},
220 result.generate_reports(reports);
274 ot->name =
"Insert Keyframes";
275 ot->idname =
"GRAPH_OT_keyframe_insert";
276 ot->description =
"Insert keyframes for the specified channels";
310 if (
ELEM(
nullptr, ale, ale->
data)) {
348 val = val * scale - offset;
406 mval[0] = (
event->xy[0] - region->
winrct.
xmin);
407 mval[1] = (
event->xy[1] - region->
winrct.
ymin);
423 ot->name =
"Click-Insert Keyframes";
424 ot->idname =
"GRAPH_OT_click_insert";
425 ot->description =
"Insert new keyframe at the cursor position for the active F-Curve";
442 "Frame to insert keyframe on",
446 ot->srna,
"value", 1.0f, -
FLT_MAX,
FLT_MAX,
"Value",
"Value for keyframe on", 0, 100);
452 "Extend selection instead of deselecting everything first");
466 ListBase anim_data = {
nullptr,
nullptr};
508 paste_context.
flip = flip;
517 ListBase anim_data = {
nullptr,
nullptr};
561 ot->name =
"Copy Keyframes";
562 ot->idname =
"GRAPH_OT_copy";
563 ot->description =
"Copy selected keyframes to the internal clipboard";
592 &ac, offset_mode, value_offset_mode, merge_mode, flipped);
618 return TIP_(
"Paste keyframes from mirrored bones if they exist");
630 ot->name =
"Paste Keyframes";
631 ot->idname =
"GRAPH_OT_paste";
633 "Paste keyframes from the internal clipboard for the selected channels, starting on the "
653 "Paste time offset of keys");
659 "Paste keys with a value offset");
665 "Method of merging pasted keys and existing");
667 ot->srna,
"flipped",
false,
"Flipped",
"Paste keyframes from mirrored bones if they exist");
679 ListBase anim_data = {
nullptr,
nullptr};
681 bool changed =
false;
727 ot->name =
"Duplicate Keyframes";
728 ot->idname =
"GRAPH_OT_duplicate";
729 ot->description =
"Make a copy of all selected keyframes";
755 ListBase anim_data = {
nullptr,
nullptr};
757 bool changed_final =
false;
776 changed_final =
true;
782 ale->key_data =
nullptr;
789 return changed_final;
821 IFACE_(
"Delete selected keyframes?"),
833 ot->name =
"Delete Keyframes";
834 ot->idname =
"GRAPH_OT_delete";
835 ot->description =
"Remove all selected keyframes";
855 ListBase anim_data = {
nullptr,
nullptr};
867 const bool only_selected_keys = !clean_chan;
870 clean_fcurve(ale, thresh, clean_chan, only_selected_keys);
907 ot->name =
"Clean Keyframes";
908 ot->idname =
"GRAPH_OT_clean";
909 ot->description =
"Simplify F-Curves by removing closely spaced keyframes";
921 ot->srna,
"threshold", 0.001f, 0.0f,
FLT_MAX,
"Threshold",
"", 0.0f, 1000.0f);
936 ListBase anim_data = {
nullptr,
nullptr};
971 Scene *scene =
nullptr;
998 ot->name =
"Keys to Samples";
999 ot->idname =
"GRAPH_OT_keys_to_samples";
1001 "Convert selected channels to an uneditable set of samples to save storage space";
1024 ListBase anim_data = {
nullptr,
nullptr};
1050 Scene *scene =
nullptr;
1074 ot->name =
"Samples to Keys";
1075 ot->idname =
"GRAPH_OT_samples_to_keys";
1076 ot->description =
"Convert selected channels from samples to keyframes";
1086#ifdef WITH_AUDASPACE
1101struct tSoundBakeInfo {
1114 tSoundBakeInfo *sbi = (tSoundBakeInfo *)
data;
1116 int position =
evaltime - sbi->cfra;
1117 if ((position < 0) || (position >= sbi->length)) {
1121 return sbi->samples[position];
1129 ListBase anim_data = {
nullptr,
nullptr};
1133 Scene *scene =
nullptr;
1153 sbi.samples = AUD_readSoundBuffer(filepath,
1163 scene->frames_per_second(),
1167 if (sbi.samples ==
nullptr) {
1173 sbi.cfra = start = scene->
r.
cfra;
1174 end = scene->
r.
cfra + sbi.length - 1;
1233 ot->name =
"Sound to Samples";
1234 ot->idname =
"GRAPH_OT_sound_to_samples";
1235 ot->description =
"Bakes a sound wave to samples on selected channels";
1259 "Cutoff frequency of a high-pass filter that is applied to the audio data",
1267 "Highest Frequency",
1268 "Cutoff frequency of a low-pass filter that is applied to the audio data",
1277 "Value for the envelope calculation that tells how fast the envelope can rise "
1278 "(the lower the value the steeper it can rise)",
1287 "Value for the envelope calculation that tells how fast the envelope can fall "
1288 "(the lower the value the steeper it can fall)",
1297 "Minimum amplitude value needed to influence the envelope",
1304 "Only the positive differences of the envelope amplitudes are summarized to "
1305 "produce the output");
1310 "The amplitudes of the envelope are summarized (or, when Accumulate is enabled, "
1311 "both positive and negative differences are accumulated)");
1316 "The output is a square curve (negative values always result in -1, and "
1317 "positive ones in 1)");
1324 "Square only: all values with an absolute amplitude lower than that result in 0",
1341 ListBase anim_data = {
nullptr,
nullptr};
1384 ot->name =
"Bake Keyframes";
1385 ot->idname =
"GRAPH_OT_bake_keys";
1386 ot->description =
"Add keyframes on every frame between the selected keyframes";
1406#define MAKE_CYCLIC_EXPO -1
1407#define CLEAR_CYCLIC_EXPO -2
1414 "Constant Extrapolation",
1415 "Values on endpoint keyframes are held"},
1419 "Linear Extrapolation",
1420 "Straight-line slope of end segments are extended past the endpoint keyframes"},
1425 "Make Cyclic (F-Modifier)",
1426 "Add Cycles F-Modifier if one does not exist already"},
1430 "Clear Cyclic (F-Modifier)",
1431 "Remove Cycles F-Modifier if not needed anymore"},
1432 {0,
nullptr, 0,
nullptr,
nullptr},
1438 ListBase anim_data = {
nullptr,
nullptr};
1517 ot->name =
"Set F-Curve Extrapolation";
1518 ot->idname =
"GRAPH_OT_extrapolation_type";
1519 ot->description =
"Set extrapolation mode for selected F-Curves";
1542 ListBase anim_data = {
nullptr,
nullptr};
1594 ot->name =
"Set Keyframe Interpolation";
1595 ot->idname =
"GRAPH_OT_interpolation_type";
1597 "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
1621 ListBase anim_data = {
nullptr,
nullptr};
1671 ot->name =
"Set Keyframe Easing Type";
1672 ot->idname =
"GRAPH_OT_easing_type";
1674 "Set easing type for the F-Curve segments starting from the selected keyframes";
1698 ListBase anim_data = {
nullptr,
nullptr};
1756 ot->name =
"Set Keyframe Handle Type";
1757 ot->idname =
"GRAPH_OT_handle_type";
1758 ot->description =
"Set type of handle for selected keyframes";
1800 const float precision = 1
e-5;
1801 return fabs(keyframes[0]->vec[1][0] - keyframes[1]->vec[1][0]) > precision ||
1802 fabs(keyframes[1]->vec[1][0] - keyframes[2]->vec[1][0]) > precision ||
1803 fabs(keyframes[0]->vec[1][0] - keyframes[2]->vec[1][0]) > precision;
1810 ListBase euler_groups = {
nullptr,
nullptr};
1821 if (strstr(fcu->
rna_path,
"rotation_euler") ==
nullptr) {
1827 "Euler Rotation F-Curve has invalid index (ID='%s', Path='%s', Index=%d)",
1828 (ale->id) ? ale->id->name :
RPT_(
"<No ID>"),
1859 return euler_groups;
1871 "Missing %s%s%s component(s) of euler rotation for ID='%s' and RNA-Path='%s'",
1872 (euf->
fcurves[0] ==
nullptr) ?
"X" :
"",
1873 (euf->
fcurves[1] ==
nullptr) ?
"Y" :
"",
1874 (euf->
fcurves[2] ==
nullptr) ?
"Z" :
"",
1886 "XYZ rotations not equally keyed for ID='%s' and RNA-Path='%s'",
1897 float filtered_euler[3] = {
1903 for (
int keyframe_index = 1; keyframe_index < fcu_rot_x->
totvert; ++keyframe_index) {
1905 &fcu_rot_x->
bezt[keyframe_index],
1906 &fcu_rot_y->
bezt[keyframe_index],
1907 &fcu_rot_z->
bezt[keyframe_index],
1915 const float unfiltered_euler[3] = {
1916 keyframes[0]->
vec[1][1],
1917 keyframes[1]->
vec[1][1],
1918 keyframes[2]->
vec[1][1],
1952 if (fcu->
bezt ==
nullptr) {
1958 bool is_modified =
false;
1959 for (
i = 1, prev = fcu->
bezt, bezt = fcu->
bezt + 1;
i < fcu->totvert;
i++, prev = bezt++) {
1960 const float sign = (prev->vec[1][1] > bezt->
vec[1][1]) ? 1.0f : -1.0f;
1963 if ((
sign * (prev->vec[1][1] - bezt->
vec[1][1])) <
float(
M_PI)) {
1971 while ((
sign * (prev->vec[1][1] - bezt->
vec[1][1])) >=
float(
M_PI)) {
1972 bezt->
vec[0][1] += fac;
1973 bezt->
vec[1][1] += fac;
1974 bezt->
vec[2][1] += fac;
1985 int *r_curves_filtered,
1988 *r_curves_filtered = 0;
1992 int curves_filtered_this_group = 0;
1995 curves_filtered_this_group = 3;
1998 for (
int channel_index = 0; channel_index < 3; channel_index++) {
1999 FCurve *fcu = euf->fcurves[channel_index];
2000 if (fcu ==
nullptr) {
2006 ++curves_filtered_this_group;
2010 *r_curves_filtered +=
min_ii(3, curves_filtered_this_group);
2032 ListBase anim_data = {
nullptr,
nullptr};
2049 int curves_filtered;
2057 if (curves_filtered == 0) {
2058 if (curves_seen < 3) {
2066 "No Euler Rotations could be corrected, ensure each rotation has keys for all "
2068 "and that F-Curves for these are in consecutive XYZ order and selected");
2073 if (curves_filtered != curves_seen) {
2077 "%d of %d rotation channels were filtered (see the Info window for details)",
2081 else if (curves_seen == 1) {
2098 ot->name =
"Euler Discontinuity Filter";
2099 ot->idname =
"GRAPH_OT_euler_filter";
2101 "Fix large jumps and flips in the selected "
2102 "Euler Rotation F-Curves arising from rotation "
2103 "values being clipped when baking physics";
2125 if (
G.is_rendering) {
2134 ListBase anim_data = {
nullptr,
nullptr};
2153 static_cast<FCurve *
>(ale->key_data),
2157 memset(¤t_ked, 0,
sizeof(current_ked));
2160 ale,
static_cast<FCurve *
>(ale->key_data),
false,
true);
2165 if (current_ked.
i1 == 0) {
2169 ked.
f1 += current_ked.
f1;
2170 ked.
i1 += current_ked.
i1;
2171 ked.
f2 += (current_ked.
f2 + offset * current_ked.
i1) * unit_scale;
2172 ked.
i2 += current_ked.
i2;
2191 const float sum_time = keyframe_sum.
f1;
2192 const float sum_value = keyframe_sum.
f2;
2193 const int num_keyframes = keyframe_sum.
i1;
2195 if (num_keyframes == 0) {
2224 ot->name =
"Jump to Keyframes";
2225 ot->idname =
"GRAPH_OT_frame_jump";
2226 ot->description =
"Place the cursor on the midpoint of selected keyframes";
2246 ot->name =
"Jump to Keyframe";
2247 ot->description =
"Jump to previous/next keyframe";
2248 ot->idname =
"GRAPH_OT_keyframe_jump";
2254 ot->undo_group =
"Frame Change";
2270 const float sum_value = keyframe_sum.
f2;
2271 const int num_keyframes = keyframe_sum.
i1;
2273 if (num_keyframes == 0) {
2288 ot->name =
"Snap Cursor Value to Selected";
2289 ot->idname =
"GRAPH_OT_snap_cursor_value";
2290 ot->description =
"Place the cursor value on the average value of selected keyframes";
2311 "Selection to Current Frame",
2312 "Snap selected keyframes to the current frame"},
2316 "Selection to Cursor Value",
2317 "Set values of selected keyframes to the cursor value (Y/Horizontal component)"},
2321 "Selection to Nearest Frame",
2322 "Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe "
2327 "Selection to Nearest Second",
2328 "Snap selected keyframes to the nearest second"},
2332 "Selection to Nearest Marker",
2333 "Snap selected keyframes to the nearest marker"},
2338 "Flatten handles for a smoother transition"},
2339 {0,
nullptr, 0,
nullptr,
nullptr},
2345 ListBase anim_data = {
nullptr,
nullptr};
2351 float cursor_value = 0.0f;
2367 cursor_value = (sipo) ? sipo->
cursorVal : 0.0f;
2390 ac->
scene, ale->
id,
static_cast<FCurve *
>(ale->key_data), mapping_flag, &offset);
2392 ked.
f1 = (cursor_value / unit_scale) - offset;
2397 ale,
static_cast<FCurve *
>(ale->key_data),
false,
false);
2403 ale,
static_cast<FCurve *
>(ale->key_data),
true,
false);
2439 ListBase anim_data = {
nullptr,
nullptr};
2453 bool has_selected_control_points =
false;
2455 const FCurve *fcu =
static_cast<const FCurve *
>(ale->key_data);
2457 has_selected_control_points =
true;
2464 return has_selected_control_points;
2482 ot->name =
"Snap Keys";
2483 ot->idname =
"GRAPH_OT_snap";
2484 ot->description =
"Snap selected keyframes to the chosen times/values";
2509 {0,
nullptr, 0,
nullptr,
nullptr},
2520 ListBase anim_data = {
nullptr,
nullptr};
2562 ot->name =
"Equalize Handles";
2563 ot->idname =
"GRAPH_OT_equalize_handles";
2565 "Ensure selected keyframes' handles have equal length, optionally making them horizontal. "
2566 "Automatic, Automatic Clamped, or Vector handle types will be converted to Aligned";
2581 "Side of the keyframes' Bézier handles to affect");
2588 "Length to make selected keyframes' Bézier handles",
2596 "Make the values of the selected keyframes' handles the same as their respective keyframes");
2610 "By Times Over Current Frame",
2611 "Flip times of selected keyframes using the current frame as the mirror line"},
2615 "By Values Over Cursor Value",
2616 "Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the "
2621 "By Times Over Zero Time",
2622 "Flip times of selected keyframes, effectively reversing the order they appear in"},
2626 "By Values Over Zero Value",
2627 "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"},
2631 "By Times Over First Selected Marker",
2632 "Flip times of selected keyframes using the first selected marker as the reference point"},
2633 {0,
nullptr, 0,
nullptr,
nullptr},
2639 ListBase anim_data = {
nullptr,
nullptr};
2645 float cursor_value = 0.0f;
2667 cursor_value = (sipo) ? sipo->
cursorVal : 0.0f;
2696 static_cast<FCurve *
>(ale->key_data),
2700 ked.
f1 = (cursor_value - offset) / unit_scale;
2705 ale,
static_cast<FCurve *
>(ale->key_data),
false,
false);
2709 ale,
static_cast<FCurve *
>(ale->key_data),
true,
false);
2745 ot->name =
"Mirror Keys";
2746 ot->idname =
"GRAPH_OT_mirror";
2747 ot->description =
"Flip selected keyframes over the selected mirror line";
2770 ListBase anim_data = {
nullptr,
nullptr};
2807 ot->name =
"Smooth Keys";
2808 ot->idname =
"GRAPH_OT_smooth";
2809 ot->description =
"Apply weighted moving means to make selected F-Curves less bumpy";
2847 if (fmi ==
nullptr) {
2866 ListBase anim_data = {
nullptr,
nullptr};
2923 ot->name =
"Add F-Curve Modifier";
2924 ot->idname =
"GRAPH_OT_fmodifier_add";
2925 ot->description =
"Add F-Modifier to the active/selected F-Curves";
2942 ot->srna,
"only_active",
false,
"Only Active",
"Only add F-Modifier to active F-Curve");
2969 if (ale && ale->
data) {
2990 ot->name =
"Copy F-Modifiers";
2991 ot->idname =
"GRAPH_OT_fmodifier_copy";
2992 ot->description =
"Copy the F-Modifier(s) of the active F-Curve";
3007 "Copy all the F-Modifiers, instead of just the active one");
3021 ListBase anim_data = {
nullptr,
nullptr};
3081 ot->name =
"Paste F-Modifiers";
3082 ot->idname =
"GRAPH_OT_fmodifier_paste";
3083 ot->description =
"Add copied F-Modifiers to the selected F-Curves";
3094 ot->srna,
"only_active",
false,
"Only Active",
"Only paste F-Modifiers on active F-Curve");
3100 "Replace existing F-Modifiers, instead of just appending to the end of the existing list");
3135 ot->name =
"Copy Driver Variables";
3136 ot->idname =
"GRAPH_OT_driver_variables_copy";
3137 ot->description =
"Copy the driver variables of the active driver";
3183 ot->name =
"Paste Driver Variables";
3184 ot->idname =
"GRAPH_OT_driver_variables_paste";
3185 ot->description =
"Add copied driver variables to the active driver";
3199 "Replace existing driver variables, instead of just appending to the end of the "
3212 ListBase anim_data = {
nullptr,
nullptr};
3286 ot->name =
"Delete Invalid Drivers";
3287 ot->idname =
"GRAPH_OT_driver_delete_invalid";
3288 ot->description =
"Delete all visible drivers considered invalid";
Functions to work with AnimData.
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
AnimationEvalContext BKE_animsys_eval_context_construct(struct Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
ScrArea * CTX_wm_area(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
bool BKE_fcurve_is_keyframable(const FCurve *fcu)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
void BKE_fcurve_handles_recalc(FCurve *fcu)
void fcurve_samples_to_keyframes(FCurve *fcu, int start, int end)
FModifier * add_fmodifier(ListBase *modifiers, int type, FCurve *owner_fcu)
bool remove_fmodifier(ListBase *modifiers, FModifier *fcm)
bool list_has_suitable_fmodifier(const ListBase *modifiers, int mtype, short acttype)
void set_active_fmodifier(ListBase *modifiers, FModifier *fcm)
float evaluate_fcurve_only_curve(const FCurve *fcu, float evaltime)
bool BKE_fcurve_is_empty(const FCurve *fcu)
bool BKE_fcurve_delete_keys_selected(FCurve *fcu)
void BKE_fcurve_keyframe_move_value_with_handles(BezTriple *keyframe, float new_value)
void BKE_fcurve_merge_duplicate_keys(FCurve *fcu, const int sel_flag, const bool use_handle)
bool BKE_fcurve_has_selected_control_points(const FCurve *fcu)
void fcurve_store_samples(FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
float fcurve_samplingcb_evalcurve(FCurve *fcu, void *data, float evaltime)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
File and directory operations.
bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_kdtree_nd_ free(KDTree *tree)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
MINLINE int min_ii(int a, int b)
void mat3_normalized_to_compatible_eul(float eul[3], const float oldrot[3], float mat[3][3])
void eul_to_mat3(float mat[3][3], const float eul[3])
#define BLT_I18NCONTEXT_ID_ACTION
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ FCURVE_EXTRAPOLATE_CONSTANT
@ FCURVE_EXTRAPOLATE_LINEAR
#define ANIM_UPDATE_DEFAULT_NOHANDLES
#define ANIM_UPDATE_DEFAULT
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
@ KEYFRAME_PASTE_MERGE_MIX
@ KEYFRAME_PASTE_VALUE_OFFSET_NONE
@ KEYFRAME_PASTE_OFFSET_CFRA_START
short(*)(KeyframeEditData *ked, BezTriple *bezt) KeyframeEditFunc
@ KEYFRAME_PASTE_NOTHING_TO_PASTE
@ KEYFRAME_PASTE_NOWHERE_TO_PASTE
void ED_region_tag_redraw(ARegion *region)
Read Guarded memory(de)allocation.
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
#define CLEAR_CYCLIC_EXPO
void ANIM_animdata_freelist(ListBase *anim_data)
void ANIM_deselect_keys_in_animation_editors(bContext *C)
void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data)
short ANIM_get_normalization_flags(SpaceLink *space_link)
void ANIM_nla_mapping_apply_if_needed_fcurve(bAnimListElem *ale, FCurve *fcu, const bool restore, const bool only_keys)
float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset)
float ANIM_nla_tweakedit_remap(bAnimListElem *ale, const float cframe, const eNlaTime_ConvertModes mode)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBase *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
TimeMarker * ED_markers_get_first_selected(ListBase *markers)
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
bool ANIM_driver_vars_copy(ReportList *reports, FCurve *fcu)
bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace)
bool ANIM_remove_driver(ID *id, const char rna_path[], int array_index)
Main Driver Management API calls.
bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *curve)
void ANIM_fmodifiers_copybuf_free()
bool ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, bool active)
static wmOperatorStatus graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_graphkeys_insertkey_types[]
void GRAPH_OT_delete(wmOperatorType *ot)
static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
static wmOperatorStatus graphkeys_click_insert_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graphkeys_snap_cursor_value_exec(bContext *C, wmOperator *)
void GRAPH_OT_click_insert(wmOperatorType *ot)
void GRAPH_OT_fmodifier_paste(wmOperatorType *ot)
void GRAPH_OT_smooth(wmOperatorType *ot)
static const EnumPropertyItem prop_graphkeys_equalize_handles_sides[]
static void clean_graph_keys(bAnimContext *ac, float thresh, bool clean_chan)
static wmOperatorStatus graphkeys_sound_to_samples_exec(bContext *, wmOperator *op)
static void mirror_graph_keys(bAnimContext *ac, short mode)
static KeyframeEditData sum_selected_keyframes(bAnimContext *ac)
static wmOperatorStatus graphkeys_clean_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graphkeys_mirror_exec(bContext *C, wmOperator *op)
static bool copy_graph_keys(bAnimContext *ac)
void GRAPH_OT_equalize_handles(wmOperatorType *ot)
static wmOperatorStatus graphkeys_bake_exec(bContext *C, wmOperator *)
static bool euler_filter_multi_channel(tEulerFilter *euf, ReportList *reports)
void GRAPH_OT_keyframe_jump(wmOperatorType *ot)
static bool graph_driver_delete_invalid_poll(bContext *C)
void GRAPH_OT_snap_cursor_value(wmOperatorType *ot)
static wmOperatorStatus graphkeys_ipo_exec(bContext *C, wmOperator *op)
static void euler_filter_perform_filter(ListBase *eulers, ReportList *reports, int *r_curves_filtered, int *r_curves_seen)
static void sethandles_graph_keys(bAnimContext *ac, short mode)
void GRAPH_OT_bake_keys(wmOperatorType *ot)
static bool euler_filter_single_channel(FCurve *fcu)
static bool keyframe_time_differs(BezTriple *keyframes[3])
static wmOperatorStatus graph_driver_delete_invalid_exec(bContext *C, wmOperator *op)
void GRAPH_OT_mirror(wmOperatorType *ot)
static wmOperatorStatus graph_fmodifier_add_exec(bContext *C, wmOperator *op)
static void bake_graph_keys(bAnimContext *ac)
static wmOperatorStatus graph_driver_vars_copy_exec(bContext *C, wmOperator *op)
static bool graph_has_selected_control_points(bContext *C)
static wmOperatorStatus graphkeys_sound_to_samples_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void snap_graph_keys(bAnimContext *ac, short mode)
void GRAPH_OT_keys_to_samples(wmOperatorType *ot)
void GRAPH_OT_fmodifier_copy(wmOperatorType *ot)
void GRAPH_OT_samples_to_keys(wmOperatorType *ot)
static const EnumPropertyItem prop_graphkeys_mirror_types[]
static wmOperatorStatus graphkeys_snap_exec(bContext *C, wmOperator *op)
void GRAPH_OT_handle_type(wmOperatorType *ot)
static std::string graphkeys_paste_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static void equalize_graph_keys(bAnimContext *ac, int mode, float handle_length, bool flatten)
static wmOperatorStatus graphkeys_delete_invoke(bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus graphkeys_insertkey_exec(bContext *C, wmOperator *op)
void GRAPH_OT_frame_jump(wmOperatorType *ot)
static wmOperatorStatus graphkeys_equalize_handles_exec(bContext *C, wmOperator *op)
void GRAPH_OT_driver_variables_copy(wmOperatorType *ot)
static wmOperatorStatus graph_driver_vars_paste_exec(bContext *C, wmOperator *op)
void GRAPH_OT_extrapolation_type(wmOperatorType *ot)
static bool delete_graph_keys(bAnimContext *ac)
static wmOperatorStatus graphkeys_delete_exec(bContext *C, wmOperator *)
void GRAPH_OT_sound_to_samples(wmOperatorType *ot)
static wmOperatorStatus graphkeys_handletype_exec(bContext *C, wmOperator *op)
void GRAPH_OT_driver_variables_paste(wmOperatorType *ot)
static wmOperatorStatus graphkeys_expo_exec(bContext *C, wmOperator *op)
void GRAPH_OT_interpolation_type(wmOperatorType *ot)
static wmOperatorStatus graphkeys_duplicate_exec(bContext *C, wmOperator *)
static wmOperatorStatus graphkeys_paste_exec(bContext *C, wmOperator *op)
static void setexpo_graph_keys(bAnimContext *ac, short mode)
eGraphKeys_InsertKey_Types
@ GRAPHKEYS_INSERTKEY_CURSOR
@ GRAPHKEYS_INSERTKEY_ACTIVE
@ GRAPHKEYS_INSERTKEY_ALL
@ GRAPHKEYS_INSERTKEY_SEL
static eKeyPasteError paste_graph_keys(bAnimContext *ac, const eKeyPasteOffset offset_mode, const eKeyPasteValueOffset value_offset_mode, const eKeyMergeMode merge_mode, const bool flip)
static wmOperatorStatus graphkeys_copy_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
static void convert_keys_to_samples(bAnimContext *ac, int start, int end)
static wmOperatorStatus graphkeys_smooth_exec(bContext *C, wmOperator *)
static const EnumPropertyItem prop_graphkeys_expo_types[]
static const EnumPropertyItem * graph_fmodifier_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
void GRAPH_OT_easing_type(wmOperatorType *ot)
void GRAPH_OT_copy(wmOperatorType *ot)
static void setipo_graph_keys(bAnimContext *ac, short mode)
void GRAPH_OT_driver_delete_invalid(wmOperatorType *ot)
static void convert_samples_to_keys(bAnimContext *ac, int start, int end)
void GRAPH_OT_keyframe_insert(wmOperatorType *ot)
static wmOperatorStatus graphkeys_click_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus graphkeys_framejump_exec(bContext *C, wmOperator *)
static wmOperatorStatus graphkeys_keys_to_samples_exec(bContext *C, wmOperator *)
static wmOperatorStatus graph_fmodifier_copy_exec(bContext *C, wmOperator *op)
void GRAPH_OT_duplicate(wmOperatorType *ot)
static void seteasing_graph_keys(bAnimContext *ac, short mode)
void GRAPH_OT_euler_filter(wmOperatorType *ot)
static bool graphkeys_framejump_poll(bContext *C)
void GRAPH_OT_clean(wmOperatorType *ot)
static wmOperatorStatus graphkeys_samples_to_keys_exec(bContext *C, wmOperator *)
static wmOperatorStatus graphkeys_easing_exec(bContext *C, wmOperator *op)
void GRAPH_OT_snap(wmOperatorType *ot)
static wmOperatorStatus graphkeys_selected_control_points_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool duplicate_graph_keys(bAnimContext *ac)
static wmOperatorStatus keyframe_jump_exec(bContext *C, wmOperator *op)
static ListBase euler_filter_group_channels(const ListBase *anim_data, ReportList *reports, int *r_num_groups)
void GRAPH_OT_fmodifier_add(wmOperatorType *ot)
static const EnumPropertyItem prop_graphkeys_snap_types[]
void GRAPH_OT_paste(wmOperatorType *ot)
bool graphop_visible_keyframes_poll(bContext *C)
@ GRAPHKEYS_MIRROR_MARKER
bool graphop_active_editable_fcurve_ctx_poll(bContext *C)
bAnimListElem * get_active_fcurve_channel(bAnimContext *ac)
@ GRAPHKEYS_SNAP_NEAREST_MARKER
@ GRAPHKEYS_SNAP_NEAREST_SECOND
@ GRAPHKEYS_SNAP_HORIZONTAL
@ GRAPHKEYS_SNAP_NEAREST_FRAME
bool graphop_editable_keyframes_poll(bContext *C)
@ GRAPHKEYS_EQUALIZE_RIGHT
@ GRAPHKEYS_EQUALIZE_BOTH
@ GRAPHKEYS_EQUALIZE_LEFT
bool graphop_active_fcurve_poll(bContext *C)
void deselect_graph_keys(bAnimContext *ac, bool test, eEditKeyframes_Select sel, bool do_channels)
bool graphop_selected_fcurve_poll(bContext *C)
KeyframeEditFunc ANIM_editkeyframes_mirror(short mode)
KeyframeEditFunc ANIM_editkeyframes_easing(short mode)
KeyframeEditFunc ANIM_editkeyframes_ipo(short mode)
void ANIM_fcurve_equalize_keyframes_loop(FCurve *fcu, const eEditKeyframes_Equalize mode, const float handle_length, const bool flatten)
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
KeyframeEditFunc ANIM_editkeyframes_ok(short mode)
KeyframeEditFunc ANIM_editkeyframes_snap(short mode)
short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt)
KeyframeEditFunc ANIM_editkeyframes_handles(short mode)
const EnumPropertyItem rna_enum_keyframe_paste_offset_items[]
const EnumPropertyItem rna_enum_keyframe_paste_merge_items[]
bool copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
const EnumPropertyItem rna_enum_keyframe_paste_offset_value_items[]
void clean_fcurve(bAnimListElem *ale, float thresh, bool cleardefault, const bool only_selected_keys)
eKeyPasteError paste_animedit_keys(bAnimContext *ac, ListBase *anim_data, const KeyframePasteContext &paste_context)
void smooth_fcurve(FCurve *fcu)
bool duplicate_fcurve_keys(FCurve *fcu)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
ccl_device_inline float2 fabs(const float2 a)
void animdata_fcurve_delete(AnimData *adt, FCurve *fcu)
KeyframeSettings get_keyframe_settings(bool from_userprefs)
CombinedKeyingResult insert_keyframes(Main *bmain, PointerRNA *struct_pointer, std::optional< StringRefNull > channel_group, const blender::Span< RNAPath > rna_paths, std::optional< float > scene_frame, const AnimationEvalContext &anim_eval_context, eBezTriple_KeyframeType key_type, eInsertKeyFlags insert_key_flags)
Main key-frame insertion API.
SingleKeyingResult insert_vert_fcurve(FCurve *fcu, const float2 position, const KeyframeSettings &settings, eInsertKeyFlags flag)
Main Key-framing API call.
void bake_fcurve_segments(FCurve *fcu)
eInsertKeyFlags get_keyframing_flags(Scene *scene)
float RNA_float_get(PointerRNA *ptr, const char *name)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_id_pointer_create(ID *id)
const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]
const EnumPropertyItem rna_enum_keyframe_handle_type_items[]
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
const EnumPropertyItem rna_enum_fmodifier_type_items[]
const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]
static wmOperatorStatus keyframe_jump_exec(bContext *C, wmOperator *op)
eKeyPasteValueOffset value_offset_mode
eKeyPasteOffset offset_mode
struct ToolSettings * toolsettings
eAnim_Update_Flags update
eBezTriple_KeyframeType keyframe_type
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, blender::wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
wmOperatorStatus WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)
wmOperatorStatus WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *)