49#include <fmt/format.h>
60#define OPERATOR_DATA_FILTER \
61 (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY | \
62 ANIMFILTER_FOREDIT | ANIMFILTER_SEL | ANIMFILTER_NODUPLIS)
106 void (*segment_function)(
FCurve *fcu,
110 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
119 segment_function(fcu, &segment, factor);
123 segments.free_no_destruct();
133 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
134 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
135 status.
item(
IFACE_(
"Adjust"), ICON_MOUSE_MOVE);
139 status.
item(str_ofs, ICON_NONE);
152 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
160 const FCurve *fcu =
static_cast<const FCurve *
>(ale.key_data);
162 if (fcu->
bezt ==
nullptr) {
174 copy->bezt = bezts_copy;
190 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
201 for (ale = anim_data.first(), link_bezt = gso->
bezt_arr_list.first(); ale; ale = ale->
next) {
204 if (fcu->
bezt ==
nullptr) {
211 MEM_delete(fcu->
bezt);
218 link_bezt = link_bezt->
next;
248 if (gso ==
nullptr) {
263 MEM_delete(copy->bezt);
280 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
299 fmt::format(
"{} ({})",
306 switch (event->
type) {
346 if (has_numinput ==
false) {
362 value = value / 100.0f;
430 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
454 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
455 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
456 status.
item(
IFACE_(
"Adjust"), ICON_MOUSE_MOVE);
460 status.
item(str_ofs, ICON_NONE);
481 const float error_sq_max =
FLT_MAX;
499 return invoke_result;
524 error_sq_max *= error_sq_max;
529 if (factor == 0.0f || error_sq_max == 0.0f) {
564 "Decimate F-Curves by specifying how much they can deviate from the original curve");
576 "Use a percentage to specify how many keyframes you want to remove"},
581 "Use an error margin to specify how much the curve is allowed to deviate from the original "
583 {0,
nullptr, 0,
nullptr,
nullptr},
589 ot->
name =
"Decimate Keyframes";
590 ot->
idname =
"GRAPH_OT_decimate";
592 "Decimate F-Curves by removing keyframes that influence the curve shape the least";
611 "Which mode to use for decimation");
619 "The ratio of keyframes to remove",
623 "remove_error_margin",
628 "How much the new decimated curve is allowed to deviate from the original",
664 return invoke_result;
674 return invoke_result;
698 ot->
name =
"Blend to Neighbor";
699 ot->
idname =
"GRAPH_OT_blend_to_neighbor";
700 ot->
description =
"Blend selected keyframes to their left or right neighbor";
717 "The blend factor with 0 being the current frame",
751 return invoke_result;
761 return invoke_result;
785 ot->
name =
"Breakdown";
786 ot->
idname =
"GRAPH_OT_breakdown";
787 ot->
description =
"Move selected keyframes to an inbetween position relative to adjacent keys";
804 "Favor either the left or the right key",
817 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
825 if (fcu ==
nullptr || fcu->
bezt ==
nullptr || fcu->
totvert == 0) {
858 return invoke_result;
867 return invoke_result;
891 ot->
name =
"Blend to Default Value";
892 ot->
idname =
"GRAPH_OT_blend_to_default";
893 ot->
description =
"Blend selected keys to their default value from their current position";
910 "How much to blend to the default value",
922 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
935 segments.free_no_destruct();
946 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
947 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
948 status.
item(
IFACE_(
"Adjust"), ICON_MOUSE_MOVE);
952 status.
item(str_ofs, ICON_NONE);
958 status.
item(
IFACE_(
"Modify Sharpness"), ICON_EVENT_TAB);
961 status.
item(
IFACE_(
"Modify Curve Bend"), ICON_EVENT_TAB);
995 switch (event->
type) {
1031 return invoke_result;
1043 return invoke_result;
1067 ot->
name =
"Ease Keyframes";
1068 ot->
idname =
"GRAPH_OT_ease";
1069 ot->
description =
"Align keyframes on a ease-in or ease-out curve";
1086 "Defines if the keys should be aligned on an ease-in or ease-out curve",
1096 "Higher values make the change more abrupt",
1135 return invoke_result;
1145 return invoke_result;
1170 ot->
name =
"Blend Offset Keyframes";
1171 ot->
idname =
"GRAPH_OT_blend_offset";
1172 ot->
description =
"Shift selected keys to the value of the neighboring keys as a block";
1189 "Control which key to offset towards and how far",
1228 return invoke_result;
1239 return invoke_result;
1264 ot->
name =
"Blend to Ease Keyframes";
1265 ot->
idname =
"GRAPH_OT_blend_to_ease";
1266 ot->
description =
"Blends keyframes from current state to an ease-in or ease-out curve";
1283 "Favor either original data or ease curve",
1296 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1298 bool all_segments_valid =
true;
1311 segments.free_no_destruct();
1314 if (!all_segments_valid) {
1317 ac->
reports,
RPT_WARNING,
"You need at least 2 keys to the right side of the selection");
1321 ac->
reports,
RPT_WARNING,
"You need at least 2 keys to the left side of the selection");
1352 return invoke_result;
1363 return invoke_result;
1389 ot->
name =
"Match Slope";
1390 ot->
idname =
"GRAPH_OT_match_slope";
1391 ot->
description =
"Blend selected keys to the slope of neighboring ones";
1408 "Defines which keys to use as slope and how much to blend towards them",
1447 return invoke_result;
1460 return invoke_result;
1485 ot->
name =
"Time Offset Keyframes";
1486 ot->
idname =
"GRAPH_OT_time_offset";
1487 ot->
description =
"Shifts the value of selected keys in time";
1504 "How far in frames to offset the animation",
1520 "Shear the keys using the left key as reference"},
1525 "Shear the keys using the right key as reference"},
1526 {0,
nullptr, 0,
nullptr,
nullptr},
1531 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1544 segments.free_no_destruct();
1554 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
1555 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
1556 status.
item(
IFACE_(
"Adjust"), ICON_MOUSE_MOVE);
1560 status.
item(str_ofs, ICON_NONE);
1565 fmt::format(
"{} ({})",
1593 switch (event->
type) {
1615 return invoke_result;
1627 return invoke_result;
1653 ot->
name =
"Shear Keyframes";
1654 ot->
idname =
"GRAPH_OT_shear";
1656 "Affect the value of the keys linearly, keeping the same relationship between them using "
1657 "either the left or the right key as reference";
1674 "The amount of shear to apply",
1683 "Which end of the segment to use as a reference to shear from");
1715 return invoke_result;
1725 return invoke_result;
1750 ot->
name =
"Scale Average Keyframes";
1751 ot->
idname =
"GRAPH_OT_scale_average";
1752 ot->
description =
"Scale selected key values by their combined average";
1769 "The scale factor applied to the curve segments",
1805 "Smooth FCurve original values");
1806 for (
int i = 0; i < segment->length; i++) {
1807 original_y_values[i] = fcu->
bezt[i + segment->start_index].
vec[1][1];
1809 return original_y_values;
1813 const int filter_width,
1817 const int kernel_size = filter_width + 1;
1820 operator_data->
kernel = kernel;
1822 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1826 ListBaseT<tFCurveSegmentLink> segment_links = {
nullptr,
nullptr};
1832 segment_link->
fcu = fcu;
1833 segment_link->
segment = &segment;
1836 BezTriple right_bezt = fcu->
bezt[segment.start_index + segment.length - 1];
1837 const int sample_count = int(right_bezt.
vec[1][0] - left_bezt.
vec[1][0]) +
1838 (filter_width * 2 + 1);
1841 fcu, left_bezt.
vec[1][0] - filter_width, 1, samples, sample_count);
1842 segment_link->
samples = samples;
1857 MEM_delete(segment_link.
samples);
1858 MEM_delete(segment_link.
segment);
1861 MEM_delete(gauss_data->
kernel);
1864 MEM_delete(gauss_data);
1886 segment.original_y_values,
1888 segment.sample_count,
1907 return invoke_result;
1924 return invoke_result;
1930 const int filter_width)
1932 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
1942 BezTriple right_bezt = fcu->
bezt[segment.start_index + segment.length - 1];
1943 const int sample_count = int(right_bezt.
vec[1][0] - left_bezt.
vec[1][0]) +
1944 (filter_width * 2 + 1);
1948 fcu, left_bezt.
vec[1][0] - filter_width, 1, samples, sample_count);
1950 fcu, &segment, original_y_values, samples, sample_count, factor, filter_width, kernel);
1951 MEM_delete(samples);
1952 MEM_delete(original_y_values);
1955 segments.free_no_destruct();
1972 const int kernel_size = filter_width + 1;
1989 ot->
name =
"Gaussian Smooth";
1990 ot->
idname =
"GRAPH_OT_gaussian_smooth";
1991 ot->
description =
"Smooth the curve using a Gaussian filter";
2008 "How much to blend to the default value",
2018 "The shape of the gaussian distribution, lower values make it sharper",
2028 "How far to each side the operator will average the key values",
2046 const int filter_order,
2047 const int samples_per_frame)
2051 const int sample_count = (int(right_bezt->
vec[1][0] - left_bezt->
vec[1][0]) + 1 +
2052 (filter_order * 2)) *
2055 return sample_count;
2059 const int filter_order,
2060 const int samples_per_frame)
2066 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2070 ListBaseT<tFCurveSegmentLink> segment_links = {
nullptr,
nullptr};
2078 segment_link->
fcu = fcu;
2079 segment_link->
segment = &segment;
2081 BezTriple right_bezt = fcu->
bezt[segment.start_index + segment.length - 1];
2083 &right_bezt, &left_bezt, filter_order, samples_per_frame);
2086 fcu, left_bezt.
vec[1][0] - filter_order, samples_per_frame, samples, sample_count);
2087 segment_link->
samples = samples;
2102 MEM_delete(segment_link.
samples);
2103 MEM_delete(segment_link.
segment);
2108 MEM_delete(btw_data);
2126 const int samples_per_frame =
RNA_int_get(op->
ptr,
"samples_per_frame");
2127 const float sampling_frequency = frame_rate * samples_per_frame;
2133 cutoff_frequency, sampling_frequency, operator_data->
coefficients);
2139 segment.sample_count,
2159 return invoke_result;
2167 const int samples_per_frame =
RNA_int_get(op->
ptr,
"samples_per_frame");
2173 const float sampling_frequency = frame_rate * samples_per_frame;
2182 return invoke_result;
2187 const int blend_in_out,
2188 float cutoff_frequency,
2189 const int filter_order,
2190 const int samples_per_frame)
2192 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2199 const float sampling_frequency = frame_rate * samples_per_frame;
2201 cutoff_frequency =
min_ff(cutoff_frequency, sampling_frequency / 2);
2210 BezTriple right_bezt = fcu->
bezt[segment.start_index + segment.length - 1];
2212 &right_bezt, &left_bezt, filter_order, samples_per_frame);
2215 fcu, left_bezt.
vec[1][0] - filter_order, samples_per_frame, samples, sample_count);
2217 fcu, &segment, samples, sample_count, factor, blend_in_out, samples_per_frame, bw_coeff);
2218 MEM_delete(samples);
2221 segments.free_no_destruct();
2240 const int samples_per_frame =
RNA_int_get(op->
ptr,
"samples_per_frame");
2243 &ac, blend, blend_in_out, cutoff_frequency, filter_order, samples_per_frame);
2254 ot->
name =
"Butterworth Smooth";
2255 ot->
idname =
"GRAPH_OT_butterworth_smooth";
2256 ot->
description =
"Smooth an F-Curve while maintaining the general shape of the curve";
2272 "Frequency Cutoff (Hz)",
2273 "Lower values give a smoother curve",
2283 "Higher values produce a harder frequency cutoff",
2288 "samples_per_frame",
2292 "Samples per Frame",
2293 "How many samples to calculate per frame, helps with subframe data",
2303 "How much to blend to the smoothed curve",
2313 "Linearly blend the smooth data to the border frames of the selection",
2346 return invoke_result;
2356 return invoke_result;
2381 ot->
name =
"Push Pull Keyframes";
2382 ot->
idname =
"GRAPH_OT_push_pull";
2383 ot->
description =
"Exaggerate or minimize the value of the selected keys";
2400 "Control how far to push or pull the keys",
2413 {0,
nullptr, 0,
nullptr,
nullptr},
2420 ListBaseT<bAnimListElem> anim_data = {
nullptr,
nullptr};
2433 segments.free_no_destruct();
2444 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
2445 status.
item(
IFACE_(
"Cancel"), ICON_EVENT_ESC);
2446 status.
item(
IFACE_(
"Adjust"), ICON_MOUSE_MOVE);
2451 status.
item(str_ofs, ICON_NONE);
2458 status.
item(fmt::format(
"{} ({})",
2488 switch (event->
type) {
2527 return invoke_result;
2553 ot->
name =
"Scale from Neighbor";
2554 ot->
idname =
"GRAPH_OT_scale_from_neighbor";
2556 "Increase or decrease the value of selected keys in relationship to the neighboring one";
2573 "The factor to scale keys with",
2582 "Which end of the segment to use as a reference to scale from");
Functions to modify FCurves.
#define ANIM_UPDATE_DEFAULT
Read Blender memory allocation and freeing.
void item(std::string text, int icon1, int icon2=0)
#define OPERATOR_DATA_FILTER
void sample_fcurve_segment(const FCurve *fcu, float start_frame, float sample_rate, float *samples, int sample_count)
ButterworthCoefficients * ED_anim_allocate_butterworth_coefficients(const int filter_order)
MINLINE float min_ff(float a, float b)
void ease_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor, const float width)
void * MEM_new_uninitialized(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static const EnumPropertyItem scale_anchor_items[]
static wmOperatorStatus push_pull_exec(bContext *C, wmOperator *op)
static void reset_bezts(tGraphSliderOp *gso)
bool ED_slider_modal(tSlider *slider, const wmEvent *event)
static void decimate_graph_keys(bAnimContext *ac, float factor, float error_sq_max)
static int btw_calculate_sample_count(const BezTriple *right_bezt, const BezTriple *left_bezt, const int filter_order, const int samples_per_frame)
static void apply_fcu_segment_function(bAnimContext *ac, const float factor, void(*segment_function)(FCurve *fcu, FCurveSegment *segment, const float factor))
void GRAPH_OT_blend_to_default(wmOperatorType *ot)
static void blend_to_default_modal_update(bContext *C, wmOperator *op)
ScrArea * CTX_wm_area(const bContext *C)
static wmOperatorStatus blend_to_default_exec(bContext *C, wmOperator *op)
void GRAPH_OT_match_slope(wmOperatorType *ot)
int RNA_enum_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus scale_from_neighbor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void scale_from_fcurve_segment_neighbor(FCurve *fcu, FCurveSegment *segment, const float factor, const FCurveSegmentAnchor anchor)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void GRAPH_OT_blend_offset(wmOperatorType *ot)
static wmOperatorStatus gaussian_smooth_exec(bContext *C, wmOperator *op)
static void match_slope_modal_update(bContext *C, wmOperator *op)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
static void btw_smooth_free_operator_data(void *operator_data)
void ED_slider_init(tSlider *slider, const wmEvent *event)
void ED_anim_calculate_butterworth_coefficients(const float cutoff_frequency, const float sampling_frequency, ButterworthCoefficients *bw_coeff)
PointerRNA RNA_id_pointer_create(ID *id)
static std::string decimate_get_description(bContext *, wmOperatorType *, PointerRNA *ptr)
static void common_draw_status_header(bContext *C, tGraphSliderOp *gso)
void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
static wmOperatorStatus ease_modal(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus scale_from_neighbor_modal(bContext *C, wmOperator *op, const wmEvent *event)
const char * RNA_property_identifier(const PropertyRNA *prop)
void GRAPH_OT_ease(wmOperatorType *ot)
void GRAPH_OT_blend_to_ease(wmOperatorType *ot)
void ED_slider_factor_set(tSlider *slider, float factor)
float ED_slider_factor_get(const tSlider *slider)
void WM_cursor_modal_set(wmWindow *win, int val)
bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
void GRAPH_OT_breakdown(wmOperatorType *ot)
static void breakdown_graph_keys(bAnimContext *ac, float factor)
static void push_pull_graph_keys(bAnimContext *ac, const float factor)
static void update_depsgraph(tGraphSliderOp *gso)
static void blend_to_neighbor_modal_update(bContext *C, wmOperator *op)
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 butterworth_smooth_fcurve_segment(FCurve *fcu, FCurveSegment *segment, float *samples, const int sample_count, const float factor, const int blend_in_out, const int sample_rate, ButterworthCoefficients *bw_coeff)
static void decimate_modal_update(bContext *C, wmOperator *op)
void blend_offset_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
void ED_slider_mode_set(tSlider *slider, SliderMode mode)
static void btw_smooth_graph_keys(bAnimContext *ac, const float factor, const int blend_in_out, float cutoff_frequency, const int filter_order, const int samples_per_frame)
static wmOperatorStatus scale_average_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool hasNumInput(const NumInput *n)
static void match_slope_graph_keys(bAnimContext *ac, const float factor)
wmWindow * CTX_wm_window(const bContext *C)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
static wmOperatorStatus graph_slider_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void shear_modal_update(bContext *C, wmOperator *op)
void GRAPH_OT_blend_to_neighbor(wmOperatorType *ot)
static void blend_offset_modal_update(bContext *C, wmOperator *op)
static const EnumPropertyItem shear_direction_items[]
static wmOperatorStatus graph_slider_modal(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus shear_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void blend_to_ease_graph_keys(bAnimContext *ac, const float factor)
static void graph_slider_exit(bContext *C, wmOperator *op)
static void shear_draw_status_header(bContext *C, tGraphSliderOp *gso, tShearDirection direction)
void MEM_delete_void(void *vmemh)
static wmOperatorStatus breakdown_exec(bContext *C, wmOperator *op)
void GRAPH_OT_gaussian_smooth(wmOperatorType *ot)
void ANIM_animdata_update(bAnimContext *ac, ListBaseT< bAnimListElem > *anim_data)
void time_offset_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float frame_offset)
void push_pull_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
static void scale_average_graph_keys(bAnimContext *ac, const float factor)
static wmOperatorStatus match_slope_exec(bContext *C, wmOperator *op)
ListBaseT< FCurveSegment > find_fcurve_segments(FCurve *fcu)
static const EnumPropertyItem decimate_mode_items[]
static wmOperatorStatus ease_invoke(bContext *C, wmOperator *op, const wmEvent *event)
tSlider * ED_slider_create(bContext *C)
SliderMode ED_slider_mode_get(const tSlider *slider)
static void time_offset_modal_update(bContext *C, wmOperator *op)
PropertyRNA * RNA_def_float_factor(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 wmOperatorStatus decimate_exec(bContext *C, wmOperator *op)
static void ease_graph_keys(bAnimContext *ac, const float factor, const float width)
static void scale_from_neighbor_draw_status_header(bContext *C, wmOperator *op)
static void ease_modal_update(bContext *C, wmOperator *op)
static void breakdown_modal_update(bContext *C, wmOperator *op)
void blend_to_neighbor_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
static void blend_offset_draw_status_header(bContext *C, tGraphSliderOp *gso)
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)
static wmOperatorStatus scale_average_exec(bContext *C, wmOperator *op)
static void blend_to_default_graph_keys(bAnimContext *ac, const float factor)
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 breakdown_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
void ED_slider_unit_set(tSlider *slider, const char *unit)
static void decimate_draw_status(bContext *C, tGraphSliderOp *gso)
static float * back_up_key_y_values(const FCurveSegment *segment, const FCurve *fcu)
static wmOperatorStatus decimate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void blend_to_neighbor_graph_keys(bAnimContext *ac, const float factor)
void scale_average_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
void WM_cursor_modal_restore(wmWindow *win)
static wmOperatorStatus time_offset_exec(bContext *C, wmOperator *op)
void ED_area_status_text(ScrArea *area, const char *str)
static void gaussian_smooth_modal_update(bContext *C, wmOperator *op)
static wmOperatorStatus blend_offset_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool match_slope_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static void blend_offset_graph_keys(bAnimContext *ac, const float factor)
bool applyNumInput(NumInput *n, float *vec)
void ED_slider_allow_overshoot_set(tSlider *slider, bool lower, bool upper)
static wmOperatorStatus blend_to_neighbor_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void btw_smooth_modal_update(bContext *C, wmOperator *op)
static void scale_from_neighbor_graph_keys(bAnimContext *ac, const float factor, const FCurveSegmentAnchor anchor)
static void gaussian_smooth_free_operator_data(void *operator_data)
static wmOperatorStatus shear_invoke(bContext *C, wmOperator *op, const wmEvent *event)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
static void time_offset_graph_keys(bAnimContext *ac, const float factor)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
void ED_slider_factor_bounds_set(tSlider *slider, float factor_bound_lower, float factor_bound_upper)
void GRAPH_OT_shear(wmOperatorType *ot)
void blend_to_default_fcurve(PointerRNA *id_ptr, FCurve *fcu, const float factor)
static bool decimate_poll_property(const bContext *, wmOperator *op, const PropertyRNA *prop)
void smooth_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float *original_values, float *samples, const int sample_count, const float factor, const int kernel_size, const double *kernel)
void shear_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor, tShearDirection direction)
static wmOperatorStatus blend_to_ease_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void ED_anim_free_butterworth_coefficients(ButterworthCoefficients *bw_coeff)
void GRAPH_OT_butterworth_smooth(wmOperatorType *ot)
void outputNumInput(NumInput *n, char *str, const UnitSettings &unit_settings)
static wmOperatorStatus match_slope_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blend_to_default_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ED_ANIM_get_1d_gauss_kernel(const float sigma, const int kernel_size, double *r_kernel)
void ANIM_animdata_freelist(ListBaseT< bAnimListElem > *anim_data)
void GRAPH_OT_scale_from_neighbor(wmOperatorType *ot)
static void gaussian_smooth_allocate_operator_data(tGraphSliderOp *gso, const int filter_width, const float sigma)
void GRAPH_OT_decimate(wmOperatorType *ot)
static void shear_graph_keys(bAnimContext *ac, const float factor, tShearDirection direction)
static void time_offset_draw_status_header(bContext *C, tGraphSliderOp *gso)
static void btw_smooth_allocate_operator_data(tGraphSliderOp *gso, const int filter_order, const int samples_per_frame)
void GRAPH_OT_time_offset(wmOperatorType *ot)
static wmOperatorStatus push_pull_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void ED_slider_status_get(const tSlider *slider, WorkspaceStatus &status)
static void store_original_bezt_arrays(tGraphSliderOp *gso)
static wmOperatorStatus time_offset_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Scene * CTX_data_scene(const bContext *C)
static wmOperatorStatus blend_to_ease_exec(bContext *C, wmOperator *op)
void GRAPH_OT_scale_average(wmOperatorType *ot)
static wmOperatorStatus btw_smooth_exec(bContext *C, wmOperator *op)
static wmOperatorStatus ease_exec(bContext *C, wmOperator *op)
static void push_pull_modal_update(bContext *C, wmOperator *op)
void GRAPH_OT_push_pull(wmOperatorType *ot)
static void match_slope_draw_status_header(bContext *C, tGraphSliderOp *gso)
static void blend_to_ease_modal_update(bContext *C, wmOperator *op)
static float slider_factor_get_and_remember(wmOperator *op)
static wmOperatorStatus scale_from_neighbor_exec(bContext *C, wmOperator *op)
void ED_slider_property_label_set(tSlider *slider, const char *property_label)
void ED_slider_increment_step_set(tSlider *slider, float increment_step)
static wmOperatorStatus blend_offset_exec(bContext *C, wmOperator *op)
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)
ARegion * CTX_wm_region(const bContext *C)
static wmOperatorStatus btw_smooth_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus gaussian_smooth_invoke(bContext *C, wmOperator *op, const wmEvent *event)
float RNA_float_get(PointerRNA *ptr, const char *name)
void ED_slider_destroy(bContext *C, tSlider *slider)
static void ease_draw_status_header(bContext *C, wmOperator *op)
static void scale_from_neighbor_modal_update(bContext *C, wmOperator *op)
static void gaussian_smooth_graph_keys(bAnimContext *ac, const float factor, double *kernel, const int filter_width)
const char * RNA_property_ui_name(const PropertyRNA *prop, const PointerRNA *ptr)
bool decimate_fcurve(bAnimListElem *ale, float remove_ratio, float error_sq_max)
static void blend_to_ease_draw_status_header(bContext *C, tGraphSliderOp *gso)
static wmOperatorStatus blend_to_neighbor_exec(bContext *C, wmOperator *op)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
static void scale_average_modal_update(bContext *C, wmOperator *op)
void blend_to_ease_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
bool graphop_editable_keyframes_poll(bContext *C)
static wmOperatorStatus shear_exec(bContext *C, wmOperator *op)
static wmOperatorStatus breakdown_invoke(bContext *C, wmOperator *op, const wmEvent *event)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eAnim_Update_Flags update
ListBaseT< bAnimListElem > anim_data
ButterworthCoefficients * coefficients
ListBaseT< tFCurveSegmentLink > segment_links
tFCurveSegmentLink * prev
tFCurveSegmentLink * next
float * original_y_values
ListBaseT< bAnimListElem > anim_data
ListBaseT< tFCurveSegmentLink > segment_links
void(*) modal_update(bContext *, wmOperator *)
PropertyRNA * factor_prop
ListBaseT< LinkData > bezt_arr_list
void(*) free_operator_data(void *operator_data)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll_property(const bContext *C, wmOperator *op, const PropertyRNA *prop) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(*) get_description(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
struct ReportList * reports
struct wmOperatorType * type
#define ISKEYMODIFIER(event_type)