37#ifdef WITH_CXX_GUARDEDALLOC
38 MEM_CXX_CLASS_ALLOC_FUNCS(
"TransSeqSnapData")
71 return snap_sources.
size() * 2;
77 return snap_sources.
size() * 5;
80static int cmp_fn(
const void *a,
const void *
b)
91 if (point_count_source == 0) {
98 int left = 0, right = 0;
131 if (point_count_source == 0) {
137 for (
Sequence *seq : snap_sources) {
138 float seq_image_quad[4][2];
141 for (
int j = 0; j < 4; j++) {
148 float image_origin[2];
172 if (strips.
contains(seq_reference)) {
175 strips.
add(seq_reference);
211 if (effects_of_snap_sources.
contains(seq)) {
215 snap_targets.
add(seq);
222 const short snap_mode)
241 const short snap_mode,
290 const short snap_mode,
296 scene, snap_mode, snap_targets);
297 if (point_count_target == 0) {
316 for (
Sequence *seq : snap_targets) {
353 const short snap_mode,
360 if (point_count_target == 0) {
385 for (
Sequence *seq : snap_targets) {
386 float seq_image_quad[4][2];
389 for (
int j = 0; j < 4; j++) {
395 float image_origin[2];
437 scene, snap_sources,
true);
443 MEM_delete(snap_data);
465 MEM_delete(snap_data);
498 int best_dist =
MAXFRAME, best_target_frame = 0, best_source_frame = 0;
502 int snap_source_frame = snap_source_point[0];
503 int snap_target_frame = snap_target_point[0];
505 if (dist > best_dist) {
510 best_target_frame = snap_target_frame;
511 best_source_frame = snap_source_frame;
534 for (
int i = 0; i < 2; i++) {
535 int dist =
abs(snap_target_point[i] - (snap_source_point[i] + t->
values[i]));
536 if (dist > best_dist[i]) {
541 best_target_point[i] = snap_target_point[i];
542 best_source_point[i] = snap_source_point[i];
550 if (best_dist[0] <= thr) {
556 if (best_dist[1] <= thr) {
562 return (best_dist[0] <= thr || best_dist[1] <= thr);
568 if (snap_data ==
nullptr) {
606 scene, empty_col,
false);
623 float snap_offset = 0;
639 int *r_snap_distance,
#define LISTBASE_FOREACH(type, var, list)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
@ SEQ_SNAP_TO_PREVIEW_CENTER
@ SEQ_SNAP_TO_STRIPS_PREVIEW
@ SEQ_SNAP_TO_PREVIEW_BORDERS
@ SEQ_SNAP_TO_CURRENT_FRAME
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
float UI_view2d_region_to_view_x(const View2D *v2d, float x)
ListBase * SEQ_channels_displayed_get(Editing *ed)
constexpr int64_t size() const
bool contains(const Key &key) const
int64_t remove_if(Predicate &&predicate)
local_group_size(16, 16) .push_constant(Type b
int SEQ_effect_get_num_inputs(int seq_type)
VectorSet< Sequence * > SEQ_query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
void SEQ_iterator_set_expand(const Scene *scene, ListBase *seqbase, VectorSet< Sequence * > &strips, void seq_query_func(const Scene *scene, Sequence *seq_reference, ListBase *seqbase, VectorSet< Sequence * > &strips))
VectorSet< Sequence * > SEQ_query_selected_strips(ListBase *seqbase)
VecBase< float, 2 > float2
bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq)
ListBase * SEQ_active_seqbase_get(const Editing *ed)
short SEQ_tool_settings_snap_mode_get(Scene *scene)
int SEQ_tool_settings_snap_distance_get(Scene *scene)
short SEQ_tool_settings_snap_flag_get(Scene *scene)
Editing * SEQ_editing_get(const Scene *scene)
bool SEQ_relation_is_effect_of_strip(const Sequence *effect, const Sequence *input)
int SEQ_time_left_handle_frame_get(const Scene *, const Sequence *seq)
float SEQ_time_content_end_frame_get(const Scene *scene, const Sequence *seq)
float SEQ_time_start_frame_get(const Sequence *seq)
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
TransConvertTypeInfo * data_type
blender::Array< blender::float2 > target_snap_points
blender::Array< blender::float2 > source_snap_points
TransSeqSnapData * seq_context
ccl_device_inline int abs(int x)