42#include "RNA_prototypes.hh"
84 N_(
"Standard transitions between keyframes")),
85 {
int(InterpolationType::Linear),
89 "Straight-line interpolation between A and B (i.e. no ease in/out)"},
90 {
int(InterpolationType::CurveMap),
94 "Custom interpolation defined using a curve map"},
98 N_(
"Predefined inertial transitions, useful for motion graphics "
99 "(from least to most \"dramatic\")")),
100 {
int(InterpolationType::Sine),
104 "Sinusoidal easing (weakest, almost linear but with a slight curvature)"},
105 {
int(InterpolationType::Quadratic),
"QUAD", ICON_IPO_QUAD,
"Quadratic",
"Quadratic easing"},
106 {
int(InterpolationType::Cubic),
"CUBIC", ICON_IPO_CUBIC,
"Cubic",
"Cubic easing"},
107 {
int(InterpolationType::Quartic),
"QUART", ICON_IPO_QUART,
"Quartic",
"Quartic easing"},
108 {
int(InterpolationType::Quintic),
"QUINT", ICON_IPO_QUINT,
"Quintic",
"Quintic easing"},
109 {
int(InterpolationType::Exponential),
113 "Exponential easing (dramatic)"},
114 {
int(InterpolationType::Circular),
118 "Circular easing (strongest and most dynamic)"},
121 N_(
"Simple physics-inspired easing effects")),
122 {
int(InterpolationType::Back),
126 "Cubic easing with overshoot and settle"},
127 {
int(InterpolationType::Bounce),
131 "Exponentially decaying parabolic bounce, like when objects collide"},
132 {
int(InterpolationType::Elastic),
136 "Exponentially decaying sine wave, like an elastic band"},
138 {0,
nullptr, 0,
nullptr,
nullptr},
142 {
int(InterpolateFlipMode::None),
"NONE", 0,
"No Flip",
""},
143 {
int(InterpolateFlipMode::Flip),
"FLIP", 0,
"Flip",
""},
144 {
int(InterpolateFlipMode::FlipAuto),
"AUTO", 0,
"Automatic",
""},
145 {0,
nullptr, 0,
nullptr,
nullptr},
149 {
int(InterpolateLayerMode::Active),
"ACTIVE", 0,
"Active",
""},
150 {
int(InterpolateLayerMode::All),
"ALL", 0,
"All Layers",
""},
151 {0,
nullptr, 0,
nullptr,
nullptr},
205 SortedKeysIterator prev_key_it = layer.sorted_keys_iterator_at(frame_number);
209 SortedKeysIterator next_key_it = std::next(prev_key_it);
212 auto is_valid_keyframe = [&](
const FramesMapKeyT key) {
214 if (!frame || frame->is_end()) {
223 for (; next_key_it != sorted_keys.
end(); ++next_key_it) {
224 if (is_valid_keyframe(*next_key_it)) {
228 for (; prev_key_it != sorted_keys.
begin(); --prev_key_it) {
229 if (is_valid_keyframe(*prev_key_it)) {
233 if (next_key_it == sorted_keys.
end() || !is_valid_keyframe(*prev_key_it)) {
237 return std::make_pair(*prev_key_it, *next_key_it);
243 const int current_frame,
244 const bool exclude_breakdowns,
245 const bool only_selected,
251 layer, current_frame, exclude_breakdowns);
256 BLI_assert(layer.has_drawing_at(interval->first));
257 BLI_assert(layer.has_drawing_at(interval->second));
258 const Drawing &from_drawing = *grease_pencil.get_drawing_at(layer, interval->first);
259 const Drawing &to_drawing = *grease_pencil.get_drawing_at(layer, interval->second);
274 const int pairs_num = std::min(from_selection.
size(), to_selection.
size());
284 from_selection.
slice(0, pairs_num)
286 to_selection.
slice(0, pairs_num)
298 const int current_frame = scene.r.cfra;
303 const Layer &active_layer = *grease_pencil.get_active_layer();
314 data->active_layer_index = *grease_pencil.get_layer_index(active_layer);
317 const auto layer_mode = InterpolateLayerMode(
RNA_enum_get(op.
ptr,
"layers"));
318 switch (layer_mode) {
319 case InterpolateLayerMode::Active:
322 case InterpolateLayerMode::All:
324 grease_pencil.layers().index_range(),
326 data->layer_mask_memory,
327 [&](
const int layer_index) { return grease_pencil.layer(layer_index).is_editable(); });
331 bool found_mapping =
false;
332 data->layer_data.reinitialize(grease_pencil.layers().size());
333 data->layer_mask.foreach_index([&](
const int layer_index) {
334 const Layer &layer = grease_pencil.layer(layer_index);
341 data->exclude_breakdowns,
344 found_mapping = found_mapping || has_curve_mapping;
348 if (!found_mapping) {
354 active_layer, current_frame, data->exclude_breakdowns);
355 data->init_factor = active_layer_interval ?
356 float(current_frame - active_layer_interval->first) /
357 (active_layer_interval->second - active_layer_interval->first + 1) :
365 if (from_positions.
size() < 2 || to_positions.
size() < 2) {
369 constexpr float min_angle =
DEG2RADF(15);
372 const float3 &from_last = from_positions.
last();
380 .radian() < min_angle)
396 return math::dot(from_last - from_first, to_last - to_first) < 0.0f;
402 const float mix_factor,
403 const InterpolateFlipMode flip_mode)
418 std::sort(sorted_pairs.
begin(), sorted_pairs.
end(), [&](
const int a,
const int b) {
419 const int from_frame_a = curve_pairs.from_frames[a];
420 const int to_frame_a = curve_pairs.to_frames[a];
421 const int from_frame_b = curve_pairs.from_frames[b];
422 const int to_frame_b = curve_pairs.to_frames[b];
423 return from_frame_a < from_frame_b ||
424 (from_frame_a == from_frame_b && to_frame_a < to_frame_b);
430 int prev_from_frame = INT_MIN;
431 int prev_to_frame = INT_MIN;
432 int current_count = 0;
433 for (
const int sorted_index :
IndexRange(dst_curve_num)) {
434 const int pair_index = sorted_pairs[sorted_index];
435 const int from_frame = curve_pairs.
from_frames[pair_index];
436 const int to_frame = curve_pairs.
to_frames[pair_index];
437 if (from_frame != prev_from_frame || to_frame != prev_to_frame) {
439 if (current_count > 0) {
440 pair_offsets.
append(current_count);
446 if (current_count > 0) {
447 pair_offsets.
append(current_count);
468 for (
const int pair_range_i : curves_by_pair.
index_range()) {
469 const IndexRange pair_range = curves_by_pair[pair_range_i];
472 const int first_pair_index = sorted_pairs[pair_range.
first()];
473 const int from_frame = curve_pairs.
from_frames[first_pair_index];
474 const int to_frame = curve_pairs.
to_frames[first_pair_index];
475 const Drawing *from_drawing = grease_pencil.get_drawing_at(layer, from_frame);
476 const Drawing *to_drawing = grease_pencil.get_drawing_at(layer, to_frame);
477 if (!from_drawing || !to_drawing) {
485 for (
const int sorted_index : pair_range) {
486 const int pair_index = sorted_pairs[sorted_index];
487 const int from_curve = curve_pairs.
from_curves[pair_index];
488 const int to_curve = curve_pairs.
to_curves[pair_index];
489 const IndexRange from_points = from_points_by_curve[from_curve];
490 const IndexRange to_points = to_points_by_curve[to_curve];
492 dst_curve_offsets[pair_index] = std::max(from_points.
size(), to_points.
size());
494 case InterpolateFlipMode::None:
495 dst_curve_flip[pair_index] =
false;
497 case InterpolateFlipMode::Flip:
498 dst_curve_flip[pair_index] =
true;
500 case InterpolateFlipMode::FlipAuto: {
502 to_positions.
slice(to_points));
510 const int dst_point_num = dst_points_by_curve.
total_size();
514 if (dst_curve_num > 0) {
521 Array<int> sorted_from_curve_indices(dst_curve_num);
522 Array<int> sorted_to_curve_indices(dst_curve_num);
524 for (
const int pair_range_i : curves_by_pair.
index_range()) {
525 const IndexRange pair_range = curves_by_pair[pair_range_i];
526 const int first_pair_index = sorted_pairs[pair_range.
first()];
527 const int from_frame = curve_pairs.
from_frames[first_pair_index];
528 const int to_frame = curve_pairs.
to_frames[first_pair_index];
529 const Drawing *from_drawing = grease_pencil.get_drawing_at(layer, from_frame);
530 const Drawing *to_drawing = grease_pencil.get_drawing_at(layer, to_frame);
531 if (!from_drawing || !to_drawing) {
541 sorted_pairs.
as_span().slice(pair_range), selection_memory);
545 for (
const int i : pair_range) {
546 const int pair_index = sorted_pairs[i];
547 sorted_from_curve_indices[i] = std::clamp(
549 sorted_to_curve_indices[i] = std::clamp(
550 curve_pairs.
to_curves[pair_index], 0,
int(to_curves.
last()));
583 status = msg + std::string(str_ofs);
586 status = msg + std::to_string(
int((opdata.
init_factor + opdata.
shift) * 100.0f)) +
" %";
591 &C,
IFACE_(
"ESC/RMB to cancel, Enter/LMB to confirm, WHEEL/MOVE to adjust factor"));
597 const int frame_number)
601 const std::optional<int> start_frame = layer.start_frame_at(frame_number);
602 if (start_frame && *start_frame == frame_number) {
603 return grease_pencil.get_editable_drawing_at(layer, frame_number);
612 const int frame_number)
622 return grease_pencil.insert_frame(layer, frame_number, 0, keyframe_type);
632 const int current_frame = scene.r.cfra;
635 const auto flip_mode = InterpolateFlipMode(
RNA_enum_get(op.
ptr,
"flip"));
637 opdata.layer_mask.foreach_index([&](
const int layer_index) {
638 Layer &layer = grease_pencil.layer(layer_index);
643 if (dst_drawing ==
nullptr) {
647 const float mix_factor = opdata.init_factor + opdata.shift;
649 grease_pencil, layer, layer_data.
curve_pairs, mix_factor, flip_mode);
651 if (opdata.smooth_factor > 0.0f && opdata.smooth_steps > 0) {
657 interpolated_curves.
cyclic(),
659 opdata.smooth_factor,
688 const int current_frame = scene.r.cfra;
692 opdata.layer_mask.foreach_index([&](
const int layer_index) {
693 Layer &layer = grease_pencil.layer(layer_index);
698 Drawing *drawing = grease_pencil.get_editable_drawing_at(layer, current_frame);
708 grease_pencil.remove_frames(layer, {current_frame});
726 const int current_frame = scene.r.cfra;
731 data.layer_mask.foreach_index([&](
const int layer_index) {
732 Layer &layer = grease_pencil.layer(layer_index);
814 switch (event->
type) {
855 const float mouse_pos =
event->mval[0];
856 const float factor = std::clamp(
889 ot->
name =
"Grease Pencil Interpolation";
890 ot->
idname =
"GREASE_PENCIL_OT_interpolate";
891 ot->
description =
"Interpolate grease pencil strokes between frames";
907 "Bias factor for which frame has more influence on the interpolated strokes",
916 "Layers included in the interpolation");
919 "exclude_breakdowns",
921 "Exclude Breakdowns",
922 "Exclude existing Breakdowns keyframes as interpolation extremes");
928 "Use only selected strokes for interpolating");
933 int(InterpolateFlipMode::FlipAuto),
935 "Invert destination stroke to match start and end with source stroke");
943 "Number of times to smooth newly created strokes",
953 "Amount of smoothing to apply to interpolated strokes, to reduce jitter/noise",
967 const float back_easing,
968 const float amplitude,
973 constexpr float begin = 0.0f;
974 constexpr float change = 1.0f;
975 constexpr float duration = 1.0f;
978 case InterpolationType::Linear:
981 case InterpolationType::CurveMap:
984 case InterpolationType::Back:
998 case InterpolationType::Bounce:
1012 case InterpolationType::Circular:
1026 case InterpolationType::Cubic:
1040 case InterpolationType::Elastic:
1054 case InterpolationType::Exponential:
1068 case InterpolationType::Quadratic:
1082 case InterpolationType::Quartic:
1096 case InterpolationType::Quintic:
1110 case InterpolationType::Sine:
1144 const int current_frame = scene.r.cfra;
1162 Layer &layer = grease_pencil.layer(layer_index);
1171 const int frame_range_size = interval->second - interval->first + 1;
1174 for (
int cframe = interval->first + step; cframe < interval->second; cframe += step) {
1177 if (dst_drawing ==
nullptr) {
1181 const float base_factor =
float(cframe - interval->first) /
1182 std::max(frame_range_size - 1, 1);
1184 easing, type, back_easing, amplitude, period, *ipo_settings.
custom_ipo, base_factor);
1195 interpolated_curves.
cyclic(),
1252 if (type == InterpolationType::CurveMap) {
1257 &scene->id, &RNA_GPencilInterpolateSettings, &ts->
gp_interpolate);
1259 layout, &gpsettings_ptr,
"interpolation_curve", 0,
false,
true,
true,
false);
1261 else if (type != InterpolationType::Linear) {
1264 if (type == InterpolationType::Back) {
1268 else if (type == InterpolationType::Elastic) {
1281 ot->
name =
"Interpolate Sequence";
1282 ot->
idname =
"GREASE_PENCIL_OT_interpolate_sequence";
1284 ot->
description =
"Generate 'in-betweens' to smoothly interpolate between Grease Pencil frames";
1296 "Number of frames between generated interpolated frames",
1305 "Layers included in the interpolation");
1308 "exclude_breakdowns",
1310 "Exclude Breakdowns",
1311 "Exclude existing Breakdowns keyframes as interpolation extremes");
1316 int(InterpolateFlipMode::FlipAuto),
1318 "Invert destination stroke to match start and end with source stroke");
1326 "Number of times to smooth newly created strokes",
1336 "Amount of smoothing to apply to interpolated strokes, to reduce jitter/noise",
1345 "Interpolation method to use the next time 'Interpolate Sequence' is run");
1354 "Which ends of the segment between the preceding and following grease pencil frames "
1355 "easing interpolation is applied to");
1364 "Amount of overshoot for 'back' easing",
1374 "Amount to boost elastic bounces for 'elastic' easing",
1384 "Time between bounces for elastic easing",
1410 {
int(InterpolateToolModalEvent::Cancel),
"CANCEL", 0,
"Cancel",
""},
1411 {
int(InterpolateToolModalEvent::Confirm),
"CONFIRM", 0,
"Confirm",
""},
1412 {
int(InterpolateToolModalEvent::Increase),
"INCREASE", 0,
"Increase",
""},
1413 {
int(InterpolateToolModalEvent::Decrease),
"DECREASE", 0,
"Decrease",
""},
1414 {0,
nullptr, 0,
nullptr,
nullptr},
@ CTX_MODE_EDIT_GPENCIL_LEGACY
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
ToolSettings * CTX_data_tool_settings(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
enum eContextObjectMode CTX_data_mode_enum(const bContext *C)
Low-level operations for curves.
Low-level operations for grease pencil.
General operations, lookup, etc. for materials.
#define BLI_assert_unreachable()
float BLI_easing_sine_ease_in(float time, float begin, float change, float duration)
float BLI_easing_back_ease_out(float time, float begin, float change, float duration, float overshoot)
float BLI_easing_bounce_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_quint_ease_out(float time, float begin, float change, float duration)
float BLI_easing_quart_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_circ_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_quart_ease_out(float time, float begin, float change, float duration)
float BLI_easing_bounce_ease_in(float time, float begin, float change, float duration)
float BLI_easing_circ_ease_in(float time, float begin, float change, float duration)
float BLI_easing_expo_ease_in(float time, float begin, float change, float duration)
float BLI_easing_expo_ease_out(float time, float begin, float change, float duration)
float BLI_easing_elastic_ease_in(float time, float begin, float change, float duration, float amplitude, float period)
float BLI_easing_quad_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_elastic_ease_out(float time, float begin, float change, float duration, float amplitude, float period)
float BLI_easing_cubic_ease_in(float time, float begin, float change, float duration)
float BLI_easing_elastic_ease_in_out(float time, float begin, float change, float duration, float amplitude, float period)
float BLI_easing_quint_ease_in(float time, float begin, float change, float duration)
float BLI_easing_sine_ease_out(float time, float begin, float change, float duration)
float BLI_easing_bounce_ease_out(float time, float begin, float change, float duration)
float BLI_easing_quad_ease_in(float time, float begin, float change, float duration)
float BLI_easing_quad_ease_out(float time, float begin, float change, float duration)
float BLI_easing_circ_ease_out(float time, float begin, float change, float duration)
float BLI_easing_cubic_ease_out(float time, float begin, float change, float duration)
float BLI_easing_back_ease_in(float time, float begin, float change, float duration, float overshoot)
float BLI_easing_quint_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_expo_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_quart_ease_in(float time, float begin, float change, float duration)
float BLI_easing_back_ease_in_out(float time, float begin, float change, float duration, float overshoot)
float BLI_easing_cubic_ease_in_out(float time, float begin, float change, float duration)
float BLI_easing_sine_ease_in_out(float time, float begin, float change, float duration)
int isect_seg_seg_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2])
#define ISECT_LINE_LINE_CROSS
#define CTX_N_(context, msgid)
#define BLT_I18NCONTEXT_ID_GPENCIL
void DEG_id_tag_update(ID *id, unsigned int flags)
void ED_interpolatetool_modal_keymap(wmKeyConfig *keyconf)
void ED_operatortypes_grease_pencil_interpolate()
void ED_area_status_text(ScrArea *area, const char *str)
void ED_workspace_status_text(bContext *C, const char *str)
Read Guarded memory(de)allocation.
#define RNA_ENUM_ITEM_HEADING(name, description)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
Span< T > as_span() const
MutableSpan< T > as_mutable_span()
constexpr int64_t first() const
constexpr int64_t last(const int64_t n=0) const
constexpr int64_t size() const
constexpr bool is_empty() const
static constexpr IndexRange from_single(const int64_t index)
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr void copy_from(Span< T > values) const
constexpr Span slice(int64_t start, int64_t size) const
constexpr const T & first() const
constexpr int64_t size() const
constexpr const T & last(const int64_t n=0) const
constexpr const T * end() const
constexpr const T * begin() const
void append(const T &value)
void resize(const int64_t new_size)
MutableSpan< T > as_mutable_span()
void append_n_times(const T &value, const int64_t n)
MutableSpan< float3 > positions_for_write()
OffsetIndices< int > points_by_curve() const
IndexRange curves_range() const
Span< float3 > positions() const
void tag_positions_changed()
MutableSpan< int > offsets_for_write()
VArray< bool > cyclic() const
bke::CurvesGeometry & strokes_for_write()
const bke::CurvesGeometry & strokes() const
void tag_topology_changed()
const int * SortedKeysIterator
static IndexMask from_predicate(const IndexMask &universe, GrainSize grain_size, IndexMaskMemory &memory, Fn &&predicate)
void to_indices(MutableSpan< T > r_indices) const
IndexMask slice(IndexRange range) const
static IndexMask from_indices(Span< T > indices, IndexMaskMemory &memory)
void foreach_index(Fn &&fn) const
IndexRange index_range() const
local_group_size(16, 16) .push_constant(Type b
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void fill_index_range(MutableSpan< T > span, const T start=0)
static bool has_anything_selected(const Span< Curves * > curves_ids)
IndexMask retrieve_selected_curves(const bke::CurvesGeometry &curves, IndexMaskMemory &memory)
bool active_grease_pencil_poll(bContext *C)
static float grease_pencil_interpolate_sequence_easing_calc(const eBezTriple_Easing easing, const InterpolationType type, const float back_easing, const float amplitude, const float period, const CurveMapping &custom_ipo, const float time)
static void grease_pencil_interpolate_exit(bContext &C, wmOperator &op)
static bool find_curve_mapping_from_index(const GreasePencil &grease_pencil, const bke::greasepencil::Layer &layer, const int current_frame, const bool exclude_breakdowns, const bool only_selected, InterpolationPairs &pairs)
static int grease_pencil_interpolate_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bke::CurvesGeometry interpolate_between_curves(const GreasePencil &grease_pencil, const bke::greasepencil::Layer &layer, const InterpolationPairs &curve_pairs, const float mix_factor, const InterpolateFlipMode flip_mode)
InterpolateToolModalEvent
static void grease_pencil_interpolate_cancel(bContext *C, wmOperator *op)
constexpr float interpolate_factor_min
static void grease_pencil_interpolate_status_indicators(bContext &C, const InterpolateOpData &opdata)
static const EnumPropertyItem grease_pencil_interpolate_layer_items[]
static bool grease_pencil_interpolate_init(const bContext &C, wmOperator &op)
static int grease_pencil_interpolate_sequence_exec(bContext *C, wmOperator *op)
static const EnumPropertyItem grease_pencil_interpolate_flip_mode_items[]
static bool compute_auto_flip(const Span< float3 > from_positions, const Span< float3 > to_positions)
static int grease_pencil_interpolate_invoke(bContext *C, wmOperator *op, const wmEvent *)
static const EnumPropertyItem grease_pencil_interpolation_type_items[]
static void grease_pencil_interpolate_sequence_ui(bContext *C, wmOperator *op)
static bke::greasepencil::Drawing * get_drawing_at_exact_frame(GreasePencil &grease_pencil, bke::greasepencil::Layer &layer, const int frame_number)
constexpr float interpolate_factor_max
static bool grease_pencil_interpolate_poll(bContext *C)
static void grease_pencil_interpolate_update(bContext &C, const wmOperator &op)
static void GREASE_PENCIL_OT_interpolate_sequence(wmOperatorType *ot)
static std::optional< FramesMapKeyIntervalT > find_frames_interval(const bke::greasepencil::Layer &layer, const int frame_number, const bool exclude_breakdowns)
static void grease_pencil_interpolate_restore(bContext &C, wmOperator &op)
static void GREASE_PENCIL_OT_interpolate(wmOperatorType *ot)
std::pair< int, int > FramesMapKeyIntervalT
static bke::greasepencil::Drawing * ensure_drawing_at_exact_frame(GreasePencil &grease_pencil, bke::greasepencil::Layer &layer, InterpolateOpData::LayerData &layer_data, const int frame_number)
void interpolate_curves(const bke::CurvesGeometry &from_curves, const bke::CurvesGeometry &to_curves, Span< int > from_curve_indices, Span< int > to_curve_indices, const IndexMask &dst_curve_mask, Span< bool > dst_curve_flip_direction, const float mix_factor, bke::CurvesGeometry &dst_curves)
void smooth_curve_attribute(const IndexMask &curves_to_smooth, const OffsetIndices< int > points_by_curve, const VArray< bool > &point_selection, const VArray< bool > &cyclic, int iterations, float influence, bool smooth_ends, bool keep_shape, GMutableSpan attribute_data)
AngleRadianBase< T > angle_between(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
T dot(const QuaternionBase< T > &a, const QuaternionBase< T > &b)
MatBase< T, NumCol, NumRow > normalize(const MatBase< T, NumCol, NumRow > &a)
T distance_squared(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
OffsetIndices< int > accumulate_counts_to_offsets(MutableSpan< int > counts_to_offsets, int start_offset=0)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
int RNA_int_get(PointerRNA *ptr, const char *name)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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)
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)
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)
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)
const EnumPropertyItem rna_enum_beztriple_interpolation_easing_items[]
struct CurveMapping * custom_ipo
InterpolationPairs curve_pairs
std::optional< bke::CurvesGeometry > orig_curves
IndexMaskMemory layer_mask_memory
InterpolateFlipMode flipmode
static InterpolateOpData * from_operator(const bContext &C, const wmOperator &op)
Array< LayerData > layer_data
Vector< int > from_frames
Vector< int > from_curves
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
const char * translation_context
void(* ui)(bContext *C, wmOperator *op)
void(* cancel)(bContext *C, wmOperator *op)
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
wmKeyMap * WM_modalkeymap_find(wmKeyConfig *keyconf, const char *idname)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))