33#include "RNA_prototypes.hh"
89 "Insert a keyframe on all visible and editable F-Curves using each curve's current value"},
93 "Only Selected Channels",
94 "Insert a keyframe on selected F-Curves using each curve's current value"},
98 "Only Active F-Curve",
99 "Insert a keyframe on the active F-Curve using the curve's current value"},
103 "Active Channels at Cursor",
104 "Insert a keyframe for the active F-Curve at the cursor point"},
108 "Selected Channels at Cursor",
109 "Insert a keyframe for selected F-Curves at the cursor point"},
110 {0,
nullptr, 0,
nullptr,
nullptr},
117 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
138 if (num_items == 0) {
142 "No active F-Curve to add a keyframe to. Select an editable F-Curve first");
167 ac->
scene, ale.
id,
static_cast<FCurve *
>(ale.key_data), mapping_flag, &offset);
211 const std::optional<StringRefNull> channel_group = fcu->
grp ? std::optional(fcu->
grp->
name) :
213 if (ale.id && !ale.owner && !fcu->
driver) {
218 {{fcu->rna_path(), {}, fcu->array_index}},
224 result.generate_reports(reports);
278 ot->
name =
"Insert Keyframes";
279 ot->
idname =
"GRAPH_OT_keyframe_insert";
280 ot->
description =
"Insert keyframes for the specified channels";
314 if (
ELEM(
nullptr, ale, ale->
data)) {
326 ListBaseT<bAnimListElem> anim_data;
352 val = val *
scale - offset;
363 anim_data.clear_no_delete();
410 mval[0] = (
event->xy[0] - region->
winrct.
xmin);
411 mval[1] = (
event->xy[1] - region->
winrct.
ymin);
427 ot->
name =
"Click-Insert Keyframes";
428 ot->
idname =
"GRAPH_OT_click_insert";
429 ot->
description =
"Insert new keyframe at the cursor position for the active F-Curve";
446 "Frame to insert keyframe on",
450 ot->
srna,
"value", 1.0f, -
FLT_MAX,
FLT_MAX,
"Value",
"Value for keyframe on", 0, 100);
456 "Extend selection instead of deselecting everything first");
470 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
512 paste_context.
flip = flip;
521 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
565 ot->
name =
"Copy Keyframes";
566 ot->
idname =
"GRAPH_OT_copy";
567 ot->
description =
"Copy selected keyframes to the internal clipboard";
596 &ac, offset_mode, value_offset_mode, merge_mode, flipped);
622 return TIP_(
"Paste keyframes from mirrored bones if they exist");
634 ot->
name =
"Paste Keyframes";
635 ot->
idname =
"GRAPH_OT_paste";
637 "Paste keyframes from the internal clipboard for the selected channels, starting on the "
657 "Paste time offset of keys");
663 "Paste keys with a value offset");
669 "Method of merging pasted keys and existing");
671 ot->
srna,
"flipped",
false,
"Flipped",
"Paste keyframes from mirrored bones if they exist");
683 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
685 bool changed =
false;
731 ot->
name =
"Duplicate Keyframes";
732 ot->
idname =
"GRAPH_OT_duplicate";
733 ot->
description =
"Make a copy of all selected keyframes";
759 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
761 bool changed_final =
false;
773 bool changed =
false;
782 changed_final =
true;
788 ale.key_data =
nullptr;
795 return changed_final;
827 IFACE_(
"Delete selected keyframes?"),
839 ot->
name =
"Delete Keyframes";
840 ot->
idname =
"GRAPH_OT_delete";
861 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
873 const bool only_selected_keys = !clean_chan;
876 clean_fcurve(&ale, thresh, clean_chan, only_selected_keys);
916 return TIP_(
"Simplify F-Curves and remove empty or redundant channels.");
926 ot->
name =
"Clean Keyframes";
927 ot->
idname =
"GRAPH_OT_clean";
928 ot->
description =
"Simplify F-Curves by removing closely spaced keyframes";
941 ot->
srna,
"threshold", 0.001f, 0.0f,
FLT_MAX,
"Threshold",
"", 0.0f, 1000.0f);
956 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1014 ot->
name =
"Keys to Samples";
1015 ot->
idname =
"GRAPH_OT_keys_to_samples";
1017 "Convert selected channels to an uneditable set of samples to save storage space";
1040 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1085 ot->
name =
"Samples to Keys";
1086 ot->
idname =
"GRAPH_OT_samples_to_keys";
1087 ot->
description =
"Convert selected channels from samples to keyframes";
1097#ifdef WITH_AUDASPACE
1112struct tSoundBakeInfo {
1123static float fcurve_samplingcb_sound(
FCurve * ,
void *
data,
float evaltime)
1125 tSoundBakeInfo *sbi =
static_cast<tSoundBakeInfo *
>(
data);
1127 int position = evaltime - sbi->cfra;
1140 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1144 Scene *scene =
nullptr;
1164 sbi.samples = bke::sound_read_file_buffer(filepath,
1174 scene->frames_per_second(),
1178 if (sbi.samples ==
nullptr) {
1184 sbi.cfra = start = scene->r.cfra;
1185 end = scene->r.cfra + sbi.length - 1;
1204 MEM_delete(sbi.samples);
1244 ot->
name =
"Sound to Samples";
1245 ot->
idname =
"GRAPH_OT_sound_to_samples";
1246 ot->
description =
"Bakes a sound wave to samples on selected channels";
1270 "Cutoff frequency of a high-pass filter that is applied to the audio data",
1278 "Highest Frequency",
1279 "Cutoff frequency of a low-pass filter that is applied to the audio data",
1288 "Value for the envelope calculation that tells how fast the envelope can rise "
1289 "(the lower the value the steeper it can rise)",
1298 "Value for the envelope calculation that tells how fast the envelope can fall "
1299 "(the lower the value the steeper it can fall)",
1308 "Minimum amplitude value needed to influence the envelope",
1315 "Only the positive differences of the envelope amplitudes are summarized to "
1316 "produce the output");
1321 "The amplitudes of the envelope are summarized (or, when Accumulate is enabled, "
1322 "both positive and negative differences are accumulated)");
1327 "The output is a square curve (negative values always result in -1, and "
1328 "positive ones in 1)");
1335 "Square only: all values with an absolute amplitude lower than that result in 0",
1352 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1395 ot->
name =
"Bake Keyframes";
1396 ot->
idname =
"GRAPH_OT_bake_keys";
1397 ot->
description =
"Add keyframes on every frame between the selected keyframes";
1414#define MAKE_CYCLIC_EXPO -1
1415#define CLEAR_CYCLIC_EXPO -2
1422 "Constant Extrapolation",
1423 "Values on endpoint keyframes are held"},
1427 "Linear Extrapolation",
1428 "Straight-line slope of end segments are extended past the endpoint keyframes"},
1433 "Make Cyclic (F-Modifier)",
1434 "Add Cycles F-Modifier if one does not exist already"},
1438 "Clear Cyclic (F-Modifier)",
1439 "Remove Cycles F-Modifier if not needed anymore"},
1440 {0,
nullptr, 0,
nullptr,
nullptr},
1446 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1481 for (fcm = fcu->
modifiers.first(); fcm; fcm = fcn) {
1525 ot->
name =
"Set F-Curve Extrapolation";
1526 ot->
idname =
"GRAPH_OT_extrapolation_type";
1527 ot->
description =
"Set extrapolation mode for selected F-Curves";
1550 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1602 ot->
name =
"Set Keyframe Interpolation";
1603 ot->
idname =
"GRAPH_OT_interpolation_type";
1605 "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
1629 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1679 ot->
name =
"Set Keyframe Easing Type";
1680 ot->
idname =
"GRAPH_OT_easing_type";
1682 "Set easing type for the F-Curve segments starting from the selected keyframes";
1706 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1764 ot->
name =
"Set Keyframe Handle Type";
1765 ot->
idname =
"GRAPH_OT_handle_type";
1766 ot->
description =
"Set type of handle for selected keyframes";
1805 const float precision = 1
e-5;
1806 return fabs(keyframes[0]->vec[1][0] - keyframes[1]->vec[1][0]) > precision ||
1807 fabs(keyframes[1]->vec[1][0] - keyframes[2]->vec[1][0]) > precision ||
1808 fabs(keyframes[0]->vec[1][0] - keyframes[2]->vec[1][0]) > precision;
1813 const ListBaseT<bAnimListElem> *anim_data,
ReportList *reports,
int *r_num_groups)
1815 ListBaseT<tEulerFilter> euler_groups = {
nullptr,
nullptr};
1826 if (strstr(fcu->rna_path().c_str(),
"rotation_euler") ==
nullptr) {
1832 "Euler Rotation F-Curve has invalid index (ID='%s', Path='%s', Index=%d)",
1833 (ale.id) ? ale.id->name :
RPT_(
"<No ID>"),
1834 fcu->rna_path().c_str(),
1847 if ((euf) && (euf->
id == ale.id) &&
STREQ(euf->
rna_path, fcu->rna_path().c_str())) {
1860 euf->
rna_path = fcu->rna_path().c_str();
1864 return euler_groups;
1876 "Missing %s%s%s component(s) of euler rotation for ID='%s' and RNA-Path='%s'",
1877 (euf->
fcurves[0] ==
nullptr) ?
"X" :
"",
1878 (euf->
fcurves[1] ==
nullptr) ?
"Y" :
"",
1879 (euf->
fcurves[2] ==
nullptr) ?
"Z" :
"",
1891 "XYZ rotations not equally keyed for ID='%s' and RNA-Path='%s'",
1902 float filtered_euler[3] = {
1908 for (
int keyframe_index = 1; keyframe_index < fcu_rot_x->
totvert; ++keyframe_index) {
1910 &fcu_rot_x->
bezt[keyframe_index],
1911 &fcu_rot_y->
bezt[keyframe_index],
1912 &fcu_rot_z->
bezt[keyframe_index],
1920 const float unfiltered_euler[3] = {
1921 keyframes[0]->
vec[1][1],
1922 keyframes[1]->
vec[1][1],
1923 keyframes[2]->
vec[1][1],
1957 if (fcu->
bezt ==
nullptr) {
1963 bool is_modified =
false;
1964 for (i = 1, prev = fcu->
bezt, bezt = fcu->
bezt + 1; i < fcu->totvert; i++, prev = bezt++) {
1965 const float sign = (prev->vec[1][1] > bezt->
vec[1][1]) ? 1.0f : -1.0f;
1968 if ((
sign * (prev->vec[1][1] - bezt->
vec[1][1])) <
float(
M_PI)) {
1976 while ((
sign * (prev->vec[1][1] - bezt->
vec[1][1])) >=
float(
M_PI)) {
1977 bezt->
vec[0][1] += fac;
1978 bezt->
vec[1][1] += fac;
1979 bezt->
vec[2][1] += fac;
1990 int *r_curves_filtered,
1993 *r_curves_filtered = 0;
1997 int curves_filtered_this_group = 0;
2000 curves_filtered_this_group = 3;
2003 for (
int channel_index = 0; channel_index < 3; channel_index++) {
2004 FCurve *fcu = euf.fcurves[channel_index];
2005 if (fcu ==
nullptr) {
2011 ++curves_filtered_this_group;
2015 *r_curves_filtered +=
min_ii(3, curves_filtered_this_group);
2037 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2054 int curves_filtered;
2058 eulers.free_no_destruct();
2062 if (curves_filtered == 0) {
2063 if (curves_seen < 3) {
2071 "No Euler Rotations could be corrected, ensure each rotation has keys for all "
2073 "and that F-Curves for these are in consecutive XYZ order and selected");
2078 if (curves_filtered != curves_seen) {
2082 "%d of %d rotation channels were filtered (see the Info window for details)",
2086 else if (curves_seen == 1) {
2103 ot->
name =
"Euler Discontinuity Filter";
2104 ot->
idname =
"GRAPH_OT_euler_filter";
2106 "Fix large jumps and flips in the selected "
2107 "Euler Rotation F-Curves arising from rotation "
2108 "values being clipped when baking physics";
2127 if (
G.is_rendering) {
2136 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2155 static_cast<FCurve *
>(ale.key_data),
2159 memset(¤t_ked, 0,
sizeof(current_ked));
2162 &ale,
static_cast<FCurve *
>(ale.key_data),
false,
true);
2167 if (current_ked.
i1 == 0) {
2171 ked.
f1 += current_ked.
f1;
2172 ked.
i1 += current_ked.
i1;
2173 ked.
f2 += (current_ked.
f2 + offset * current_ked.
i1) * unit_scale;
2174 ked.
i2 += current_ked.
i2;
2193 const float sum_time = keyframe_sum.
f1;
2194 const float sum_value = keyframe_sum.
f2;
2195 const int num_keyframes = keyframe_sum.
i1;
2197 if (num_keyframes == 0) {
2226 ot->
name =
"Jump to Keyframes";
2227 ot->
idname =
"GRAPH_OT_frame_jump";
2228 ot->
description =
"Place the cursor on the midpoint of selected keyframes";
2254 ot->
name =
"Jump to Keyframe";
2255 ot->
description =
"Jump to previous/next keyframe";
2256 ot->
idname =
"GRAPH_OT_keyframe_jump";
2284 const float sum_value = keyframe_sum.
f2;
2285 const int num_keyframes = keyframe_sum.
i1;
2287 if (num_keyframes == 0) {
2302 ot->
name =
"Snap Cursor Value to Selected";
2303 ot->
idname =
"GRAPH_OT_snap_cursor_value";
2304 ot->
description =
"Place the cursor value on the average value of selected keyframes";
2325 "Selection to Current Frame",
2326 "Snap selected keyframes to the current frame"},
2330 "Selection to Cursor Value",
2331 "Set values of selected keyframes to the cursor value (Y/Horizontal component)"},
2335 "Selection to Nearest Frame",
2336 "Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe "
2341 "Selection to Nearest Second",
2342 "Snap selected keyframes to the nearest second"},
2346 "Selection to Nearest Marker",
2347 "Snap selected keyframes to the nearest marker"},
2352 "Flatten handles for a smoother transition"},
2353 {0,
nullptr, 0,
nullptr,
nullptr},
2359 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2365 float cursor_value = 0.0f;
2381 cursor_value = (sipo) ? sipo->
cursorVal : 0.0f;
2404 ac->
scene, ale.
id,
static_cast<FCurve *
>(ale.key_data), mapping_flag, &offset);
2406 ked.
f1 = (cursor_value / unit_scale) - offset;
2411 &ale,
static_cast<FCurve *
>(ale.key_data),
false,
false);
2417 &ale,
static_cast<FCurve *
>(ale.key_data),
true,
false);
2453 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2467 bool has_selected_control_points =
false;
2469 const FCurve *fcu =
static_cast<const FCurve *
>(ale.key_data);
2471 has_selected_control_points =
true;
2478 return has_selected_control_points;
2496 ot->
name =
"Snap Keys";
2497 ot->
idname =
"GRAPH_OT_snap";
2498 ot->
description =
"Snap selected keyframes to the chosen times/values";
2523 {0,
nullptr, 0,
nullptr,
nullptr},
2534 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2576 ot->
name =
"Equalize Handles";
2577 ot->
idname =
"GRAPH_OT_equalize_handles";
2579 "Ensure selected keyframes' handles have equal length, optionally making them horizontal. "
2580 "Automatic, Automatic Clamped, or Vector handle types will be converted to Aligned";
2595 "Side of the keyframes' Bézier handles to affect");
2602 "Length to make selected keyframes' Bézier handles",
2610 "Make the values of the selected keyframes' handles the same as their respective keyframes");
2624 "By Times Over Current Frame",
2625 "Flip times of selected keyframes using the current frame as the mirror line"},
2629 "By Times Over First Selected Marker",
2630 "Flip times of selected keyframes using the first selected marker as the reference point"},
2634 "By Times Over Zero Time",
2635 "Flip times of selected keyframes, effectively reversing the order they appear in"},
2640 "By Values Over Cursor Value",
2641 "Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the "
2646 "By Values Over Zero Value",
2647 "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"},
2648 {0,
nullptr, 0,
nullptr,
nullptr},
2654 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2660 float cursor_value = 0.0f;
2682 cursor_value = (sipo) ? sipo->
cursorVal : 0.0f;
2711 static_cast<FCurve *
>(ale.key_data),
2715 ked.
f1 = (cursor_value - offset) / unit_scale;
2720 &ale,
static_cast<FCurve *
>(ale.key_data),
false,
false);
2724 &ale,
static_cast<FCurve *
>(ale.key_data),
true,
false);
2760 ot->
name =
"Mirror Keys";
2761 ot->
idname =
"GRAPH_OT_mirror";
2762 ot->
description =
"Flip selected keyframes over the selected mirror line";
2785 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2822 ot->
name =
"Smooth Keys";
2823 ot->
idname =
"GRAPH_OT_smooth";
2824 ot->
description =
"Apply weighted moving means to make selected F-Curves less bumpy";
2859 if (fmi ==
nullptr) {
2878 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2935 ot->
name =
"Add F-Curve Modifier";
2936 ot->
idname =
"GRAPH_OT_fmodifier_add";
2937 ot->
description =
"Add F-Modifier to the active/selected F-Curves";
2954 ot->
srna,
"only_active",
false,
"Only Active",
"Only add F-Modifier to active F-Curve");
2968 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2984 int num_fmods_deleted = 0;
2985 int num_fcurves_affected = 0;
2997 fmods_to_delete.
append(&fcm);
3003 fmods_to_delete.
append(first);
3010 num_fmods_deleted++;
3014 num_fcurves_affected++;
3026 if (num_fmods_deleted == 0) {
3032 "Removed %d F-Modifier(s) from %d selected F-Curve(s)",
3034 num_fcurves_affected);
3056 ot->
name =
"Delete F-Curve Modifiers";
3057 ot->
idname =
"GRAPH_OT_fmodifier_delete";
3058 ot->
description =
"Remove Modifier(s) from the selected F-Curves";
3074 "Remove all modifiers from the selected F-Curves"},
3079 "Only remove the first modifier from each F-Curve regardless of type"},
3084 "Only remove the specified type of F-Curve modifier"},
3085 {0,
nullptr, 0,
nullptr,
nullptr}};
3092 "Decide what the operator will remove");
3125 if (ale && ale->
data) {
3146 ot->
name =
"Copy F-Modifiers";
3147 ot->
idname =
"GRAPH_OT_fmodifier_copy";
3148 ot->
description =
"Copy the F-Modifier(s) of the active F-Curve";
3163 "Copy all the F-Modifiers, instead of just the active one");
3177 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
3237 ot->
name =
"Paste F-Modifiers";
3238 ot->
idname =
"GRAPH_OT_fmodifier_paste";
3239 ot->
description =
"Add copied F-Modifiers to the selected F-Curves";
3250 ot->
srna,
"only_active",
false,
"Only Active",
"Only paste F-Modifiers on active F-Curve");
3256 "Replace existing F-Modifiers, instead of just appending to the end of the existing list");
3288 ot->
name =
"Copy Driver Variables";
3289 ot->
idname =
"GRAPH_OT_driver_variables_copy";
3290 ot->
description =
"Copy the driver variables of the active driver";
3336 ot->
name =
"Paste Driver Variables";
3337 ot->
idname =
"GRAPH_OT_driver_variables_paste";
3338 ot->
description =
"Add copied driver variables to the active driver";
3352 "Replace existing driver variables, instead of just appending to the end of the "
3365 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
3439 ot->
name =
"Delete Invalid Drivers";
3440 ot->
idname =
"GRAPH_OT_driver_delete_invalid";
3441 ot->
description =
"Delete all visible drivers considered invalid";
Functions to work with AnimData.
Functions to modify FCurves.
Functions to insert, delete or modify keyframes.
File and directory operations.
#define BLT_I18NCONTEXT_ID_ACTION
#define ANIM_UPDATE_DEFAULT_NOHANDLES
#define ANIM_UPDATE_DEFAULT
Read Blender memory allocation and freeing.
#define RNA_ENUM_ITEM_SEPR
#define CLEAR_CYCLIC_EXPO
void append(const T &value)
float length(VecOp< float, D >) RET
float3x3 scale(float3x3 mat, float2 scale)
ccl_device_inline dual3 fabs(const ccl_private dual3 &a)
ccl_device_inline float2 fmod(const float2 a, const float b)
void animdata_fcurve_delete(AnimData *adt, FCurve *fcu)
KeyframeSettings get_keyframe_settings(bool from_userprefs)
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)
CombinedKeyingResult insert_keyframes(Main *bmain, PointerRNA *struct_pointer, std::optional< StringRefNull > channel_group, const 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.
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void GRAPH_OT_easing_type(wmOperatorType *ot)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
@ KEYFRAME_PASTE_NOTHING_TO_PASTE
@ KEYFRAME_PASTE_NOWHERE_TO_PASTE
void GRAPH_OT_keys_to_samples(wmOperatorType *ot)
static wmOperatorStatus graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
wmOperatorStatus WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
KeyframeEditFunc ANIM_editkeyframes_ok(short mode)
void GRAPH_OT_click_insert(wmOperatorType *ot)
static bool graph_driver_delete_invalid_poll(bContext *C)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
ScrArea * CTX_wm_area(const bContext *C)
void eul_to_mat3(float mat[3][3], const float eul[3])
static wmOperatorStatus graphkeys_expo_exec(bContext *C, wmOperator *op)
void GRAPH_OT_equalize_handles(wmOperatorType *ot)
void GRAPH_OT_smooth(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
const EnumPropertyItem rna_enum_fmodifier_type_items[]
void GRAPH_OT_fmodifier_copy(wmOperatorType *ot)
void BKE_fcurve_keyframe_move_value_with_handles(BezTriple *keyframe, float new_value)
bool BKE_fcurve_delete_keys_selected(FCurve &fcu)
void GRAPH_OT_delete(wmOperatorType *ot)
void GRAPH_OT_copy(wmOperatorType *ot)
KeyframeEditFunc ANIM_editkeyframes_ipo(short mode)
static wmOperatorStatus graphkeys_clean_exec(bContext *C, wmOperator *op)
wmOperatorStatus WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *)
KeyframeEditFunc ANIM_editkeyframes_handles(short mode)
bool graphop_visible_keyframes_poll(bContext *C)
bool BKE_fcurve_is_keyframable(const FCurve &fcu)
void GRAPH_OT_keyframe_jump(wmOperatorType *ot)
MINLINE int round_fl_to_int(float a)
void GRAPH_OT_bake_keys(wmOperatorType *ot)
PointerRNA RNA_id_pointer_create(ID *id)
void smooth_fcurve(FCurve *fcu)
bool ANIM_driver_vars_paste(ReportList *reports, FCurve *fcu, bool replace)
static wmOperatorStatus graphkeys_easing_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graphkeys_duplicate_exec(bContext *C, wmOperator *)
static wmOperatorStatus graphkeys_equalize_handles_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graph_fmodifier_paste_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graphkeys_snap_exec(bContext *C, wmOperator *op)
bool ANIM_driver_vars_copy(ReportList *reports, FCurve *fcu)
bool graphop_selected_fcurve_poll(bContext *C)
static wmOperatorStatus graphkeys_bake_exec(bContext *C, wmOperator *)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
void clean_fcurve(bAnimListElem *ale, float thresh, bool cleardefault, const bool only_selected_keys)
static wmOperatorStatus graph_fmodifier_copy_exec(bContext *C, wmOperator *op)
float ANIM_nla_tweakedit_remap(bAnimListElem *ale, const float cframe, const eNlaTime_ConvertModes mode)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
static wmOperatorStatus graphkeys_handletype_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem prop_graphkeys_expo_types[]
static bool euler_filter_multi_channel(tEulerFilter *euf, ReportList *reports)
const EnumPropertyItem rna_enum_keyframe_paste_merge_items[]
FModifier * add_fmodifier(ListBaseT< FModifier > *modifiers, int type, FCurve *owner_fcu)
static wmOperatorStatus graphkeys_delete_exec(bContext *C, wmOperator *)
void GRAPH_OT_fmodifier_delete(wmOperatorType *ot)
static wmOperatorStatus graphkeys_delete_invoke(bContext *C, wmOperator *op, const wmEvent *)
static bool euler_filter_single_channel(FCurve *fcu)
bool duplicate_fcurve_keys(FCurve *fcu)
void ED_region_tag_redraw(ARegion *region)
bool graphop_active_fcurve_poll(bContext *C)
int RNA_enum_from_value(const EnumPropertyItem *item, const int value)
void GRAPH_OT_sound_to_samples(wmOperatorType *ot)
bool list_has_suitable_fmodifier(const ListBaseT< FModifier > *modifiers, int mtype, short acttype)
void GRAPH_OT_clean(wmOperatorType *ot)
@ KEYFRAME_PASTE_MERGE_MIX
@ KEYFRAME_PASTE_OFFSET_CFRA_START
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb)
static void convert_keys_to_samples(bAnimContext *ac, int start, int end)
static void bake_graph_keys(bAnimContext *ac)
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)
bool remove_fmodifier(ListBaseT< FModifier > *modifiers, FModifier *fcm)
void GRAPH_OT_extrapolation_type(wmOperatorType *ot)
static void equalize_graph_keys(bAnimContext *ac, int mode, float handle_length, bool flatten)
void ANIM_nla_mapping_apply_if_needed_fcurve(bAnimListElem *ale, FCurve *fcu, const bool restore, const bool only_keys)
static bool copy_graph_keys(bAnimContext *ac)
void ANIM_animdata_update(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data)
static wmOperatorStatus graphkeys_sound_to_samples_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void GRAPH_OT_frame_jump(wmOperatorType *ot)
void GRAPH_OT_samples_to_keys(wmOperatorType *ot)
AnimationEvalContext BKE_animsys_eval_context_construct(Depsgraph *depsgraph, float eval_time) ATTR_WARN_UNUSED_RESULT
static void mirror_graph_keys(bAnimContext *ac, short mode)
static std::string graphkeys_paste_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
ScenePlaybackRange BKE_scene_get_playback_range(const Scene *scene)
void BKE_fcurve_merge_duplicate_keys(FCurve *fcu, const int sel_flag, const bool use_handle)
@ FMODIFIER_TYPE_GENERATOR
void GRAPH_OT_fmodifier_add(wmOperatorType *ot)
static bool graph_has_selected_control_points(bContext *C)
void WM_operator_properties_confirm_or_exec(wmOperatorType *ot)
static wmOperatorStatus graphkeys_copy_exec(bContext *C, wmOperator *op)
bool copy_animedit_keys(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data)
static const EnumPropertyItem prop_graphkeys_mirror_types[]
static wmOperatorStatus graph_fmodifier_delete_exec(bContext *C, wmOperator *op)
static void clean_graph_keys(bAnimContext *ac, float thresh, bool clean_chan)
static void setexpo_graph_keys(bAnimContext *ac, short mode)
size_t ANIM_animdata_filter(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, const eAnimFilter_Flags filter_mode, void *data, const eAnimCont_Types datatype)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void ANIM_fcurve_equalize_keyframes_loop(FCurve *fcu, const eEditKeyframes_Equalize mode, const float handle_length, const bool flatten)
@ ANIMFILTER_DATA_VISIBLE
@ ANIMFILTER_CURVE_VISIBLE
static wmOperatorStatus graphkeys_mirror_exec(bContext *C, wmOperator *op)
void BKE_fcurve_handles_recalc(FCurve &fcu)
static bool duplicate_graph_keys(bAnimContext *ac)
static void fmodifier_delete_ui(bContext *, wmOperator *op)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
BMesh const char void * data
void GRAPH_OT_keyframe_insert(wmOperatorType *ot)
void ANIM_deselect_keys_in_animation_editors(bContext *C)
void GRAPH_OT_snap_cursor_value(wmOperatorType *ot)
static bool delete_graph_keys(bAnimContext *ac)
const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]
static std::string graphkeys_clean_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
bool ANIM_remove_driver(ID *id, const char rna_path[], int array_index)
Main Driver Management API calls.
static void snap_graph_keys(bAnimContext *ac, short mode)
TimeMarker * ED_markers_get_first_selected(ListBaseT< TimeMarker > *markers)
static bool graphkeys_framejump_poll(bContext *C)
static bool keyframe_time_differs(BezTriple *keyframes[3])
static wmOperatorStatus graphkeys_ipo_exec(bContext *C, wmOperator *op)
static wmOperatorStatus graphkeys_click_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool ANIM_fmodifiers_paste_from_buf(ListBaseT< FModifier > *modifiers, bool replace, FCurve *curve)
static wmOperatorStatus graphkeys_selected_control_points_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void GRAPH_OT_interpolation_type(wmOperatorType *ot)
static wmOperatorStatus graphkeys_framejump_exec(bContext *C, wmOperator *)
static KeyframeEditData sum_selected_keyframes(bAnimContext *ac)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
bAnimListElem * get_active_fcurve_channel(bAnimContext *ac)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
wmOperatorStatus WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, ui::AlertIcon icon, bool cancel_default)
void GRAPH_OT_driver_delete_invalid(wmOperatorType *ot)
void mat3_normalized_to_compatible_eul(float eul[3], const float oldrot[3], float mat[3][3])
static wmOperatorStatus graphkeys_smooth_exec(bContext *C, wmOperator *)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
static void sethandles_graph_keys(bAnimContext *ac, short mode)
@ GRAPHKEYS_SNAP_NEAREST_MARKER
@ GRAPHKEYS_SNAP_HORIZONTAL
@ GRAPHKEYS_SNAP_NEAREST_SECOND
@ GRAPHKEYS_SNAP_NEAREST_FRAME
static void euler_filter_perform_filter(ListBaseT< tEulerFilter > *eulers, ReportList *reports, int *r_curves_filtered, int *r_curves_seen)
static wmOperatorStatus graphkeys_paste_exec(bContext *C, wmOperator *op)
short(*)(KeyframeEditData *ked, BezTriple *bezt) KeyframeEditFunc
@ GRAPHKEYS_MIRROR_MARKER
const EnumPropertyItem rna_enum_transform_mode_type_items[]
static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
@ GRAPHKEYS_EQUALIZE_BOTH
@ GRAPHKEYS_EQUALIZE_RIGHT
@ GRAPHKEYS_EQUALIZE_LEFT
@ KEYFRAME_PASTE_VALUE_OFFSET_NONE
static void seteasing_graph_keys(bAnimContext *ac, short mode)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
static wmOperatorStatus graph_driver_vars_copy_exec(bContext *C, wmOperator *op)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
float evaluate_fcurve_only_curve(const FCurve *fcu, float evaltime)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]
Main * CTX_data_main(const bContext *C)
void ANIM_fmodifiers_copybuf_free()
static void convert_samples_to_keys(bAnimContext *ac, int start, int end)
static wmOperatorStatus graph_driver_delete_invalid_exec(bContext *C, wmOperator *op)
void deselect_graph_keys(bAnimContext *ac, bool test, eEditKeyframes_Select sel, bool do_channels)
void GRAPH_OT_driver_variables_paste(wmOperatorType *ot)
static const EnumPropertyItem prop_graphkeys_insertkey_types[]
static wmOperatorStatus graphkeys_keys_to_samples_exec(bContext *C, wmOperator *)
static wmOperatorStatus graph_fmodifier_add_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem * graph_fmodifier_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
void ANIM_animdata_freelist(ListBaseT< bAnimListElem > *anim_data)
KeyframeEditFunc ANIM_editkeyframes_snap(short mode)
float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset)
void GRAPH_OT_duplicate(wmOperatorType *ot)
const EnumPropertyItem rna_enum_keyframe_paste_offset_items[]
void GRAPH_OT_snap(wmOperatorType *ot)
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_samples_to_keys_exec(bContext *C, wmOperator *)
eKeyPasteError paste_animedit_keys(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data, const KeyframePasteContext &paste_context)
static wmOperatorStatus graph_driver_vars_paste_exec(bContext *C, wmOperator *op)
static ListBaseT< tEulerFilter > euler_filter_group_channels(const ListBaseT< bAnimListElem > *anim_data, ReportList *reports, int *r_num_groups)
static const EnumPropertyItem prop_graphkeys_snap_types[]
void GRAPH_OT_driver_variables_copy(wmOperatorType *ot)
void DEG_relations_tag_update(Main *bmain)
bool ANIM_fmodifiers_copy_to_buf(ListBaseT< FModifier > *modifiers, bool active)
Scene * CTX_data_scene(const bContext *C)
KeyframeEditFunc ANIM_editkeyframes_easing(short mode)
void GRAPH_OT_mirror(wmOperatorType *ot)
bool BKE_fcurve_is_empty(const FCurve *fcu)
void fcurve_store_samples(FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
void GRAPH_OT_fmodifier_paste(wmOperatorType *ot)
void GRAPH_OT_handle_type(wmOperatorType *ot)
static wmOperatorStatus graphkeys_insertkey_exec(bContext *C, wmOperator *op)
short bezt_calc_average(KeyframeEditData *ked, BezTriple *bezt)
float fcurve_samplingcb_evalcurve(FCurve *fcu, void *data, float evaltime)
void GRAPH_OT_euler_filter(wmOperatorType *ot)
static wmOperatorStatus graphkeys_sound_to_samples_exec(bContext *, wmOperator *op)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
bool BKE_fcurve_has_selected_control_points(const FCurve &fcu)
static wmOperatorStatus keyframe_jump_exec(bContext *C, wmOperator *op)
MINLINE int min_ii(int a, int b)
bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
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)
static void setipo_graph_keys(bAnimContext *ac, short mode)
@ FCURVE_EXTRAPOLATE_CONSTANT
@ FCURVE_EXTRAPOLATE_LINEAR
bool graphop_active_editable_fcurve_ctx_poll(bContext *C)
void set_active_fmodifier(ListBaseT< FModifier > *modifiers, FModifier *fcm)
ARegion * CTX_wm_region(const bContext *C)
const EnumPropertyItem rna_enum_keyframe_paste_offset_value_items[]
float RNA_float_get(PointerRNA *ptr, const char *name)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
const FModifierTypeInfo * get_fmodifier_typeinfo(int type)
eGraphKeys_InsertKey_Types
@ GRAPHKEYS_INSERTKEY_ACTIVE
@ GRAPHKEYS_INSERTKEY_CURSOR
@ GRAPHKEYS_INSERTKEY_ALL
@ GRAPHKEYS_INSERTKEY_SEL
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
static wmOperatorStatus graphkeys_click_insert_exec(bContext *C, wmOperator *op)
void fcurve_samples_to_keyframes(FCurve *fcu, int start, int end)
static wmOperatorStatus graphkeys_snap_cursor_value_exec(bContext *C, wmOperator *)
bool graphop_editable_keyframes_poll(bContext *C)
short ANIM_get_normalization_flags(SpaceLink *space_link)
static const EnumPropertyItem prop_graphkeys_equalize_handles_sides[]
KeyframeEditFunc ANIM_editkeyframes_mirror(short mode)
const EnumPropertyItem rna_enum_keyframe_handle_type_items[]
void GRAPH_OT_paste(wmOperatorType *ot)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
ListBaseT< FModifier > modifiers
ListBaseT< TimeMarker > time_marker_list
eKeyPasteOffset offset_mode
eKeyPasteValueOffset value_offset_mode
struct ToolSettings * toolsettings
eBezTriple_KeyframeType keyframe_type
ListBaseT< TimeMarker > * markers
eAnim_Update_Flags update
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) ui(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(*) get_description(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
struct ReportList * reports