17# include <AUD_Special.h>
32#include "RNA_prototypes.hh"
82 "Insert a keyframe on all visible and editable F-Curves using each curve's current value"},
86 "Only Selected Channels",
87 "Insert a keyframe on selected F-Curves using each curve's current value"},
91 "Only Active F-Curve",
92 "Insert a keyframe on the active F-Curve using the curve's current value"},
96 "Active Channels at Cursor",
97 "Insert a keyframe for the active F-Curve at the cursor point"},
101 "Selected Channels at Cursor",
102 "Insert a keyframe for selected F-Curves at the cursor point"},
103 {0,
nullptr, 0,
nullptr,
nullptr},
110 ListBase anim_data = {
nullptr,
nullptr};
131 if (num_items == 0) {
135 "No active F-Curve to add a keyframe to. Select an editable F-Curve first");
161 ac->
scene, ale->
id,
static_cast<FCurve *
>(ale->key_data), mapping_flag, &offset);
173 x =
float(scene->r.cfra);
178 y = (sipo->
cursorVal / unit_scale) - offset;
208 const std::optional<blender::StringRefNull> channel_group = fcu->
grp ? std::optional(
211 if (ale->id && !ale->owner && !fcu->
driver) {
216 {{fcu->rna_path, {}, fcu->array_index}},
221 if (result.get_count(SingleKeyingResult::SUCCESS) == 0) {
229 float cfra =
float(scene->r.cfra);
278 ot->
name =
"Insert Keyframes";
279 ot->
idname =
"GRAPH_OT_keyframe_insert";
280 ot->
description =
"Insert keyframes for the specified channels";
316 if (
ELEM(
nullptr, ale, ale->
data)) {
354 val = val * scale - offset;
409 mval[0] = (
event->xy[0] - region->winrct.xmin);
410 mval[1] = (
event->xy[1] - region->winrct.ymin);
426 ot->
name =
"Click-Insert Keyframes";
427 ot->
idname =
"GRAPH_OT_click_insert";
428 ot->
description =
"Insert new keyframe at the cursor position for the active F-Curve";
445 "Frame to insert keyframe on",
455 "Extend selection instead of deselecting everything first");
469 ListBase anim_data = {
nullptr,
nullptr};
507 ListBase anim_data = {
nullptr,
nullptr};
531 ac, &anim_data, offset_mode, value_offset_mode, merge_mode, flip);
563 ot->
name =
"Copy Keyframes";
565 ot->
description =
"Copy selected keyframes to the internal clipboard";
594 &ac, offset_mode, value_offset_mode, merge_mode, flipped);
620 return TIP_(
"Paste keyframes from mirrored bones if they exist");
632 ot->
name =
"Paste Keyframes";
635 "Paste keyframes from the internal clipboard for the selected channels, starting on the "
655 "Paste time offset of keys");
661 "Paste keys with a value offset");
667 "Method of merging pasted keys and existing");
669 ot->
srna,
"flipped",
false,
"Flipped",
"Paste keyframes from mirrored bones if they exist");
681 ListBase anim_data = {
nullptr,
nullptr};
683 bool changed =
false;
729 ot->
name =
"Duplicate Keyframes";
752 ListBase anim_data = {
nullptr,
nullptr};
754 bool changed_final =
false;
773 changed_final =
true;
779 ale->key_data =
nullptr;
786 return changed_final;
816 IFACE_(
"Delete selected keyframes?"),
828 ot->
name =
"Delete Keyframes";
850 ListBase anim_data = {
nullptr,
nullptr};
862 const bool only_selected_keys = !clean_chan;
866 clean_fcurve(ac, ale, thresh, clean_chan, only_selected_keys);
903 ot->
name =
"Clean Keyframes";
905 ot->
description =
"Simplify F-Curves by removing closely spaced keyframes";
917 ot->
srna,
"threshold", 0.001f, 0.0f,
FLT_MAX,
"Threshold",
"", 0.0f, 1000.0f);
932 ListBase anim_data = {
nullptr,
nullptr};
967 Scene *scene =
nullptr;
994 ot->
name =
"Keys to Samples";
995 ot->
idname =
"GRAPH_OT_keys_to_samples";
997 "Convert selected channels to an uneditable set of samples to save storage space";
1020 ListBase anim_data = {
nullptr,
nullptr};
1046 Scene *scene =
nullptr;
1070 ot->
name =
"Samples to Keys";
1071 ot->
idname =
"GRAPH_OT_samples_to_keys";
1072 ot->
description =
"Convert selected channels from samples to keyframes";
1082#ifdef WITH_AUDASPACE
1097struct tSoundBakeInfo {
1108static float fcurve_samplingcb_sound(
FCurve * ,
void *data,
float evaltime)
1110 tSoundBakeInfo *sbi = (tSoundBakeInfo *)data;
1112 int position =
evaltime - sbi->cfra;
1113 if ((position < 0) || (position >= sbi->length)) {
1117 return sbi->samples[position];
1125 ListBase anim_data = {
nullptr,
nullptr};
1129 Scene *scene =
nullptr;
1149 sbi.samples = AUD_readSoundBuffer(filepath,
1163 if (sbi.samples ==
nullptr) {
1169 sbi.cfra = start = scene->r.cfra;
1170 end = scene->r.cfra + sbi.length - 1;
1227 ot->
name =
"Sound to Samples";
1228 ot->
idname =
"GRAPH_OT_sound_to_samples";
1229 ot->
description =
"Bakes a sound wave to samples on selected channels";
1253 "Cutoff frequency of a high-pass filter that is applied to the audio data",
1261 "Highest Frequency",
1262 "Cutoff frequency of a low-pass filter that is applied to the audio data",
1271 "Value for the envelope calculation that tells how fast the envelope can rise "
1272 "(the lower the value the steeper it can rise)",
1281 "Value for the envelope calculation that tells how fast the envelope can fall "
1282 "(the lower the value the steeper it can fall)",
1291 "Minimum amplitude value needed to influence the envelope",
1298 "Only the positive differences of the envelope amplitudes are summarized to "
1299 "produce the output");
1304 "The amplitudes of the envelope are summarized (or, when Accumulate is enabled, "
1305 "both positive and negative differences are accumulated)");
1310 "The output is a square curve (negative values always result in -1, and "
1311 "positive ones in 1)");
1318 "Square only: all values with an absolute amplitude lower than that result in 0",
1335 ListBase anim_data = {
nullptr,
nullptr};
1378 ot->
name =
"Bake Keyframes";
1380 ot->
description =
"Add keyframes on every frame between the selected keyframes";
1400#define MAKE_CYCLIC_EXPO -1
1401#define CLEAR_CYCLIC_EXPO -2
1408 "Constant Extrapolation",
1409 "Values on endpoint keyframes are held"},
1413 "Linear Extrapolation",
1414 "Straight-line slope of end segments are extended past the endpoint keyframes"},
1419 "Make Cyclic (F-Modifier)",
1420 "Add Cycles F-Modifier if one doesn't exist already"},
1424 "Clear Cyclic (F-Modifier)",
1425 "Remove Cycles F-Modifier if not needed anymore"},
1426 {0,
nullptr, 0,
nullptr,
nullptr},
1432 ListBase anim_data = {
nullptr,
nullptr};
1511 ot->
name =
"Set F-Curve Extrapolation";
1512 ot->
idname =
"GRAPH_OT_extrapolation_type";
1513 ot->
description =
"Set extrapolation mode for selected F-Curves";
1536 ListBase anim_data = {
nullptr,
nullptr};
1588 ot->
name =
"Set Keyframe Interpolation";
1589 ot->
idname =
"GRAPH_OT_interpolation_type";
1591 "Set interpolation mode for the F-Curve segments starting from the selected keyframes";
1615 ListBase anim_data = {
nullptr,
nullptr};
1665 ot->
name =
"Set Keyframe Easing Type";
1666 ot->
idname =
"GRAPH_OT_easing_type";
1668 "Set easing type for the F-Curve segments starting from the selected keyframes";
1692 ListBase anim_data = {
nullptr,
nullptr};
1750 ot->
name =
"Set Keyframe Handle Type";
1751 ot->
idname =
"GRAPH_OT_handle_type";
1752 ot->
description =
"Set type of handle for selected keyframes";
1794 const float precision = 1
e-5;
1795 return fabs(keyframes[0]->vec[1][0] - keyframes[1]->vec[1][0]) > precision ||
1796 fabs(keyframes[1]->vec[1][0] - keyframes[2]->vec[1][0]) > precision ||
1797 fabs(keyframes[0]->vec[1][0] - keyframes[2]->vec[1][0]) > precision;
1804 ListBase euler_groups = {
nullptr,
nullptr};
1815 if (strstr(fcu->
rna_path,
"rotation_euler") ==
nullptr) {
1821 "Euler Rotation F-Curve has invalid index (ID='%s', Path='%s', Index=%d)",
1822 (ale->id) ? ale->id->name :
RPT_(
"<No ID>"),
1853 return euler_groups;
1865 "Missing %s%s%s component(s) of euler rotation for ID='%s' and RNA-Path='%s'",
1866 (euf->
fcurves[0] ==
nullptr) ?
"X" :
"",
1867 (euf->
fcurves[1] ==
nullptr) ?
"Y" :
"",
1868 (euf->
fcurves[2] ==
nullptr) ?
"Z" :
"",
1880 "XYZ rotations not equally keyed for ID='%s' and RNA-Path='%s'",
1891 float filtered_euler[3] = {
1897 for (
int keyframe_index = 1; keyframe_index < fcu_rot_x->
totvert; ++keyframe_index) {
1899 &fcu_rot_x->
bezt[keyframe_index],
1900 &fcu_rot_y->
bezt[keyframe_index],
1901 &fcu_rot_z->
bezt[keyframe_index],
1909 const float unfiltered_euler[3] = {
1910 keyframes[0]->
vec[1][1],
1911 keyframes[1]->
vec[1][1],
1912 keyframes[2]->
vec[1][1],
1946 if (fcu->
bezt ==
nullptr) {
1952 bool is_modified =
false;
1953 for (i = 1, prev = fcu->
bezt, bezt = fcu->
bezt + 1; i < fcu->
totvert; i++, prev = bezt++) {
1954 const float sign = (prev->vec[1][1] > bezt->
vec[1][1]) ? 1.0f : -1.0f;
1957 if ((sign * (prev->vec[1][1] - bezt->
vec[1][1])) <
float(
M_PI)) {
1963 const float fac = sign * 2.0f *
float(
M_PI);
1965 while ((sign * (prev->vec[1][1] - bezt->
vec[1][1])) >=
float(
M_PI)) {
1966 bezt->
vec[0][1] += fac;
1967 bezt->
vec[1][1] += fac;
1968 bezt->
vec[2][1] += fac;
1979 int *r_curves_filtered,
1982 *r_curves_filtered = 0;
1986 int curves_filtered_this_group = 0;
1989 curves_filtered_this_group = 3;
1992 for (
int channel_index = 0; channel_index < 3; channel_index++) {
1993 FCurve *fcu = euf->fcurves[channel_index];
1994 if (fcu ==
nullptr) {
2000 ++curves_filtered_this_group;
2004 *r_curves_filtered +=
min_ii(3, curves_filtered_this_group);
2026 ListBase anim_data = {
nullptr,
nullptr};
2043 int curves_filtered;
2051 if (curves_filtered == 0) {
2052 if (curves_seen < 3) {
2060 "No Euler Rotations could be corrected, ensure each rotation has keys for all "
2062 "and that F-Curves for these are in consecutive XYZ order and selected");
2067 if (curves_filtered != curves_seen) {
2071 "%d of %d rotation channels were filtered (see the Info window for details)",
2075 else if (curves_seen == 1) {
2092 ot->
name =
"Euler Discontinuity Filter";
2093 ot->
idname =
"GRAPH_OT_euler_filter";
2095 "Fix large jumps and flips in the selected "
2096 "Euler Rotation F-Curves arising from rotation "
2097 "values being clipped when baking physics";
2119 if (
G.is_rendering) {
2128 ListBase anim_data = {
nullptr,
nullptr};
2148 static_cast<FCurve *
>(ale->key_data),
2152 memset(¤t_ked, 0,
sizeof(current_ked));
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) {
2211 scene->r.subframe = 0.0f;
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";
2239 float *r_closest_frame)
2249 if (bezt_index > fcu->
totvert - 1) {
2252 bezt = &fcu->
bezt[bezt_index];
2255 if (bezt_index - 1 < 0) {
2258 bezt = &fcu->
bezt[bezt_index - 1];
2261 *r_closest_frame = bezt->
vec[1][0];
2277 ListBase anim_data = {
nullptr,
nullptr};
2298 float closest_fcu_frame;
2307 if ((
next && closest_fcu_frame < closest_frame) ||
2308 (!
next && closest_fcu_frame > closest_frame))
2310 closest_frame = closest_fcu_frame;
2331 ot->
name =
"Jump to Keyframe";
2333 ot->
idname =
"GRAPH_OT_keyframe_jump";
2355 const float sum_value = keyframe_sum.
f2;
2356 const int num_keyframes = keyframe_sum.
i1;
2358 if (num_keyframes == 0) {
2373 ot->
name =
"Snap Cursor Value to Selected";
2374 ot->
idname =
"GRAPH_OT_snap_cursor_value";
2375 ot->
description =
"Place the cursor value on the average value of selected keyframes";
2396 "Selection to Current Frame",
2397 "Snap selected keyframes to the current frame"},
2401 "Selection to Cursor Value",
2402 "Set values of selected keyframes to the cursor value (Y/Horizontal component)"},
2406 "Selection to Nearest Frame",
2407 "Snap selected keyframes to the nearest (whole) frame (use to fix accidental subframe "
2412 "Selection to Nearest Second",
2413 "Snap selected keyframes to the nearest second"},
2417 "Selection to Nearest Marker",
2418 "Snap selected keyframes to the nearest marker"},
2423 "Flatten handles for a smoother transition"},
2424 {0,
nullptr, 0,
nullptr,
nullptr},
2430 ListBase anim_data = {
nullptr,
nullptr};
2436 float cursor_value = 0.0f;
2452 cursor_value = (sipo) ? sipo->
cursorVal : 0.0f;
2477 ac->
scene, ale->
id,
static_cast<FCurve *
>(ale->key_data), mapping_flag, &offset);
2479 ked.
f1 = (cursor_value / unit_scale) - offset;
2532 ListBase anim_data = {
nullptr,
nullptr};
2546 bool has_selected_control_points =
false;
2548 const FCurve *fcu =
static_cast<const FCurve *
>(ale->key_data);
2550 has_selected_control_points =
true;
2557 return has_selected_control_points;
2577 ot->
description =
"Snap selected keyframes to the chosen times/values";
2602 {0,
nullptr, 0,
nullptr,
nullptr},
2613 ListBase anim_data = {
nullptr,
nullptr};
2655 ot->
name =
"Equalize Handles";
2656 ot->
idname =
"GRAPH_OT_equalize_handles";
2658 "Ensure selected keyframes' handles have equal length, optionally making them horizontal. "
2659 "Automatic, Automatic Clamped, or Vector handle types will be converted to Aligned";
2674 "Side of the keyframes' Bézier handles to affect");
2681 "Length to make selected keyframes' Bézier handles",
2689 "Make the values of the selected keyframes' handles the same as their respective keyframes");
2703 "By Times Over Current Frame",
2704 "Flip times of selected keyframes using the current frame as the mirror line"},
2708 "By Values Over Cursor Value",
2709 "Flip values of selected keyframes using the cursor value (Y/Horizontal component) as the "
2714 "By Times Over Zero Time",
2715 "Flip times of selected keyframes, effectively reversing the order they appear in"},
2719 "By Values Over Zero Value",
2720 "Flip values of selected keyframes (i.e. negative values become positive, and vice versa)"},
2724 "By Times Over First Selected Marker",
2725 "Flip times of selected keyframes using the first selected marker as the reference point"},
2726 {0,
nullptr, 0,
nullptr,
nullptr},
2732 ListBase anim_data = {
nullptr,
nullptr};
2738 float cursor_value = 0.0f;
2760 cursor_value = (sipo) ? sipo->
cursorVal : 0.0f;
2791 static_cast<FCurve *
>(ale->key_data),
2795 ked.
f1 = (cursor_value - offset) / unit_scale;
2844 ot->
name =
"Mirror Keys";
2846 ot->
description =
"Flip selected keyframes over the selected mirror line";
2869 ListBase anim_data = {
nullptr,
nullptr};
2906 ot->
name =
"Smooth Keys";
2908 ot->
description =
"Apply weighted moving means to make selected F-Curves less bumpy";
2946 if (fmi ==
nullptr) {
2965 ListBase anim_data = {
nullptr,
nullptr};
3022 ot->
name =
"Add F-Curve Modifier";
3023 ot->
idname =
"GRAPH_OT_fmodifier_add";
3024 ot->
description =
"Add F-Modifier to the active/selected F-Curves";
3041 ot->
srna,
"only_active",
false,
"Only Active",
"Only add F-Modifier to active F-Curve");
3068 if (ale && ale->
data) {
3089 ot->
name =
"Copy F-Modifiers";
3090 ot->
idname =
"GRAPH_OT_fmodifier_copy";
3091 ot->
description =
"Copy the F-Modifier(s) of the active F-Curve";
3106 "Copy all the F-Modifiers, instead of just the active one");
3120 ListBase anim_data = {
nullptr,
nullptr};
3180 ot->
name =
"Paste F-Modifiers";
3181 ot->
idname =
"GRAPH_OT_fmodifier_paste";
3182 ot->
description =
"Add copied F-Modifiers to the selected F-Curves";
3193 ot->
srna,
"only_active",
false,
"Only Active",
"Only paste F-Modifiers on active F-Curve");
3199 "Replace existing F-Modifiers, instead of just appending to the end of the existing list");
3234 ot->
name =
"Copy Driver Variables";
3235 ot->
idname =
"GRAPH_OT_driver_variables_copy";
3236 ot->
description =
"Copy the driver variables of the active driver";
3282 ot->
name =
"Paste Driver Variables";
3283 ot->
idname =
"GRAPH_OT_driver_variables_paste";
3284 ot->
description =
"Add copied driver variables to the active driver";
3298 "Replace existing driver variables, instead of just appending to the end of the "
3311 ListBase anim_data = {
nullptr,
nullptr};
3373 if ((area ==
nullptr) || (area->spacetype !=
SPACE_GRAPH)) {
3384 ot->
name =
"Delete Invalid Drivers";
3385 ot->
idname =
"GRAPH_OT_driver_delete_invalid";
3386 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)
int BKE_fcurve_bezt_binarysearch_index(const BezTriple array[], float frame, int arraylen, bool *r_replace)
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)
float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_scene_frame_set(Scene *scene, float frame)
float BKE_scene_frame_get(const Scene *scene)
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(struct ListBase *lb)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct 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_relations_tag_update(Main *bmain)
@ FCURVE_EXTRAPOLATE_CONSTANT
@ FCURVE_EXTRAPOLATE_LINEAR
@ USER_ANIM_ONLY_SHOW_SELECTED_CURVE_KEYS
#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()
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)
AnimData * ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
void ANIM_nla_mapping_apply_fcurve(AnimData *adt, FCurve *fcu, bool restore, bool only_keys)
float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short flag, float *r_offset)
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)
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
void generate_reports(ReportList *reports, eReportType report_level=RPT_ERROR)
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.
draw_view in_light_buf[] float
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 int graph_fmodifier_paste_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)
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 int graphkeys_smooth_exec(bContext *C, wmOperator *)
static void clean_graph_keys(bAnimContext *ac, float thresh, bool clean_chan)
static int graphkeys_sound_to_samples_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void mirror_graph_keys(bAnimContext *ac, short mode)
static KeyframeEditData sum_selected_keyframes(bAnimContext *ac)
static int graphkeys_bake_exec(bContext *C, wmOperator *)
static int graphkeys_delete_exec(bContext *C, wmOperator *)
void GRAPH_OT_equalize_handles(wmOperatorType *ot)
static int graphkeys_easing_exec(bContext *C, wmOperator *op)
static int graphkeys_expo_exec(bContext *C, wmOperator *op)
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)
static int graphkeys_insertkey_exec(bContext *C, wmOperator *op)
void GRAPH_OT_snap_cursor_value(wmOperatorType *ot)
static void euler_filter_perform_filter(ListBase *eulers, ReportList *reports, int *r_curves_filtered, int *r_curves_seen)
static int graphkeys_click_insert_exec(bContext *C, wmOperator *op)
static void sethandles_graph_keys(bAnimContext *ac, short mode)
static int graphkeys_selected_control_points_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void GRAPH_OT_bake_keys(wmOperatorType *ot)
static bool euler_filter_single_channel(FCurve *fcu)
static int graph_driver_delete_invalid_exec(bContext *C, wmOperator *)
static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
static bool keyframe_time_differs(BezTriple *keyframes[3])
void GRAPH_OT_mirror(wmOperatorType *ot)
static void bake_graph_keys(bAnimContext *ac)
static bool graph_has_selected_control_points(bContext *C)
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 int graphkeys_keys_to_samples_exec(bContext *C, wmOperator *)
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)
void GRAPH_OT_frame_jump(wmOperatorType *ot)
void GRAPH_OT_driver_variables_copy(wmOperatorType *ot)
void GRAPH_OT_extrapolation_type(wmOperatorType *ot)
static bool delete_graph_keys(bAnimContext *ac)
static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
void GRAPH_OT_sound_to_samples(wmOperatorType *ot)
static int graphkeys_framejump_exec(bContext *C, wmOperator *)
static int graphkeys_sound_to_samples_exec(bContext *, wmOperator *op)
static int graphkeys_samples_to_keys_exec(bContext *C, wmOperator *)
void GRAPH_OT_driver_variables_paste(wmOperatorType *ot)
static int graphkeys_delete_invoke(bContext *C, wmOperator *op, const wmEvent *)
void GRAPH_OT_interpolation_type(wmOperatorType *ot)
static int graph_driver_vars_copy_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 int graphkeys_equalize_handles_exec(bContext *C, wmOperator *op)
static void convert_keys_to_samples(bAnimContext *ac, int start, int end)
static const EnumPropertyItem prop_graphkeys_expo_types[]
static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem * graph_fmodifier_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static bool find_closest_frame(const FCurve *fcu, const float frame, const bool next, float *r_closest_frame)
static int graphkeys_click_insert_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void GRAPH_OT_easing_type(wmOperatorType *ot)
static int graph_driver_vars_paste_exec(bContext *C, wmOperator *op)
static int graphkeys_euler_filter_exec(bContext *C, wmOperator *op)
static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
void GRAPH_OT_copy(wmOperatorType *ot)
static int graphkeys_paste_exec(bContext *C, wmOperator *op)
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 int graphkeys_copy_exec(bContext *C, wmOperator *op)
static eKeyPasteError paste_graph_keys(bAnimContext *ac, const eKeyPasteOffset offset_mode, const eKeyPasteValueOffset value_offset_mode, const eKeyMergeMode merge_mode, bool flip)
void GRAPH_OT_duplicate(wmOperatorType *ot)
static void seteasing_graph_keys(bAnimContext *ac, short mode)
static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
void GRAPH_OT_euler_filter(wmOperatorType *ot)
static bool graphkeys_framejump_poll(bContext *C)
static int graphkeys_duplicate_exec(bContext *C, wmOperator *)
static short copy_graph_keys(bAnimContext *ac)
void GRAPH_OT_clean(wmOperatorType *ot)
static int graphkeys_clean_exec(bContext *C, wmOperator *op)
static int graphkeys_snap_exec(bContext *C, wmOperator *op)
#define CLEAR_CYCLIC_EXPO
void GRAPH_OT_snap(wmOperatorType *ot)
static int keyframe_jump_exec(bContext *C, wmOperator *op)
static bool duplicate_graph_keys(bAnimContext *ac)
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[]
static int graphkeys_snap_cursor_value_exec(bContext *C, wmOperator *)
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)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
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)
void clean_fcurve(bAnimContext *ac, bAnimListElem *ale, float thresh, bool cleardefault, const bool only_selected_keys)
const EnumPropertyItem rna_enum_keyframe_paste_offset_items[]
short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
const EnumPropertyItem rna_enum_keyframe_paste_merge_items[]
eKeyPasteError paste_animedit_keys(bAnimContext *ac, ListBase *anim_data, const eKeyPasteOffset offset_mode, const eKeyPasteValueOffset value_offset_mode, const eKeyMergeMode merge_mode, bool flip)
const EnumPropertyItem rna_enum_keyframe_paste_offset_value_items[]
void ANIM_fcurves_copybuf_free()
void smooth_fcurve(FCurve *fcu)
bool duplicate_fcurve_keys(FCurve *fcu)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
ccl_device_inline float2 fabs(const float2 a)
void bake_fcurve_segments(FCurve *fcu)
void animdata_fcurve_delete(bAnimContext *ac, AnimData *adt, FCurve *fcu)
eInsertKeyFlags get_keyframing_flags(Scene *scene)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
float RNA_float_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[]
struct ToolSettings * toolsettings
eAnim_Update_Flags update
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
std::string(* get_description)(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_report(eReportType type, const char *message)
void WM_reportf(eReportType type, const char *format,...)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
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)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)
int WM_operator_confirm_ex(bContext *C, wmOperator *op, const char *title, const char *message, const char *confirm_text, int icon, bool cancel_default)
int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *)