Blender V4.5
strip_transform.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 * SPDX-FileCopyrightText: 2003-2009 Blender Authors
3 * SPDX-FileCopyrightText: 2005-2006 Peter Schlaile <peter [at] schlaile [dot] de>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later */
6
11#include "BLI_bounds.hh"
12#include "BLI_math_base.hh"
13#include "DNA_scene_types.h"
14#include "DNA_sequence_types.h"
15
16#include "BLI_listbase.h"
17#include "BLI_math_base.h"
18#include "BLI_math_matrix.hh"
20
21#include "SEQ_animation.hh"
22#include "SEQ_channels.hh"
23#include "SEQ_edit.hh"
24#include "SEQ_effects.hh"
25#include "SEQ_iterator.hh"
26#include "SEQ_relations.hh"
27#include "SEQ_render.hh"
28#include "SEQ_sequencer.hh"
29#include "SEQ_time.hh"
30#include "SEQ_transform.hh"
31
32#include "sequencer.hh"
33#include "strip_time.hh"
34
35namespace blender::seq {
36
41
46
47bool transform_test_overlap(const Scene *scene, Strip *strip1, Strip *strip2)
48{
49 return (
50 strip1 != strip2 && strip1->channel == strip2->channel &&
53 time_right_handle_frame_get(scene, strip2))) == 0);
54}
55
56bool transform_test_overlap(const Scene *scene, ListBase *seqbasep, Strip *test)
57{
58 Strip *strip;
59
60 strip = static_cast<Strip *>(seqbasep->first);
61 while (strip) {
63 return true;
64 }
65
66 strip = strip->next;
67 }
68 return false;
69}
70
71void transform_translate_strip(Scene *evil_scene, Strip *strip, int delta)
72{
73 if (delta == 0) {
74 return;
75 }
76
77 /* Meta strips requires their content is to be translated, and then frame range of the meta is
78 * updated based on nested strips. This won't work for empty meta-strips,
79 * so they can be treated as normal strip. */
81 LISTBASE_FOREACH (Strip *, strip_child, &strip->seqbase) {
82 transform_translate_strip(evil_scene, strip_child, delta);
83 }
84 /* Move meta start/end points. */
85 strip_time_translate_handles(evil_scene, strip, delta);
86 }
87 else if (strip->input1 == nullptr && strip->input2 == nullptr) { /* All other strip types. */
88 strip->start += delta;
89 /* Only to make files usable in older versions. */
92 }
93
94 offset_animdata(evil_scene, strip, delta);
96 strip_time_update_effects_strip_range(evil_scene, effects);
98}
99
101 Strip *test,
102 Scene *evil_scene,
103 int channel_delta)
104{
105 const int orig_channel = test->channel;
106 BLI_assert(ELEM(channel_delta, -1, 1));
107
108 strip_channel_set(test, test->channel + channel_delta);
109
110 const ListBase *channels = channels_displayed_get(editing_get(evil_scene));
111 SeqTimelineChannel *channel = channel_get_by_index(channels, test->channel);
112
113 while (transform_test_overlap(evil_scene, seqbasep, test) || channel_is_muted(channel) ||
114 channel_is_locked(channel))
115 {
116 if ((channel_delta > 0) ? (test->channel >= MAX_CHANNELS) : (test->channel < 1)) {
117 break;
118 }
119
120 strip_channel_set(test, test->channel + channel_delta);
121 channel = channel_get_by_index(channels, test->channel);
122 }
123
124 if (!is_valid_strip_channel(test)) {
125 /* Blender 2.4x would remove the strip.
126 * nicer to move it to the end */
127
128 int new_frame = time_right_handle_frame_get(evil_scene, test);
129
130 LISTBASE_FOREACH (Strip *, strip, seqbasep) {
131 if (strip->channel == orig_channel) {
132 new_frame = max_ii(new_frame, time_right_handle_frame_get(evil_scene, strip));
133 }
134 }
135
136 strip_channel_set(test, orig_channel);
137
138 new_frame = new_frame + (test->start - time_left_handle_frame_get(
139 evil_scene, test)); /* adjust by the startdisp */
140 transform_translate_strip(evil_scene, test, new_frame - test->start);
141 return false;
142 }
143
144 return true;
145}
146
147bool transform_seqbase_shuffle(ListBase *seqbasep, Strip *test, Scene *evil_scene)
148{
149 return transform_seqbase_shuffle_ex(seqbasep, test, evil_scene, 1);
150}
151
153 const Strip *strip1,
154 const Strip *strip2,
155 const int offset)
156{
157 BLI_assert(strip1 != strip2);
158 return (strip1->channel == strip2->channel &&
159 ((time_right_handle_frame_get(scene, strip1) + offset <=
161 (time_left_handle_frame_get(scene, strip1) + offset >=
162 time_right_handle_frame_get(scene, strip2))) == 0);
163}
164
166 blender::Span<Strip *> strips_to_shuffle,
167 ListBase *seqbasep,
168 char dir)
169{
170 int offset = 0;
171 bool all_conflicts_resolved = false;
172
173 while (!all_conflicts_resolved) {
174 all_conflicts_resolved = true;
175 for (Strip *strip : strips_to_shuffle) {
176 LISTBASE_FOREACH (Strip *, strip_other, seqbasep) {
177 if (strips_to_shuffle.contains(strip_other)) {
178 continue;
179 }
180 if (relation_is_effect_of_strip(strip_other, strip)) {
181 continue;
182 }
183 if (!shuffle_strip_test_overlap(scene, strip, strip_other, offset)) {
184 continue;
185 }
186
187 all_conflicts_resolved = false;
188
189 if (dir == 'L') {
190 offset = min_ii(offset,
191 time_left_handle_frame_get(scene, strip_other) -
193 }
194 else {
195 offset = max_ii(offset,
196 time_right_handle_frame_get(scene, strip_other) -
198 }
199 }
200 }
201 }
202
203 return offset;
204}
205
207 ListBase *seqbasep,
208 Scene *evil_scene,
210 const bool use_sync_markers)
211{
214 strips_to_shuffle, empty_set, seqbasep, evil_scene, markers, use_sync_markers);
215}
216
219 ListBase *seqbasep,
220 Scene *evil_scene,
222 const bool use_sync_markers)
223{
224 int offset_l = shuffle_strip_time_offset_get(evil_scene, strips_to_shuffle, seqbasep, 'L');
225 int offset_r = shuffle_strip_time_offset_get(evil_scene, strips_to_shuffle, seqbasep, 'R');
226 int offset = (-offset_l < offset_r) ? offset_l : offset_r;
227
228 if (offset) {
229 for (Strip *strip : strips_to_shuffle) {
230 transform_translate_strip(evil_scene, strip, offset);
231 strip->flag &= ~SEQ_OVERLAP;
232 }
233
234 if (!time_dependent_strips.is_empty()) {
236 offset_animdata(evil_scene, strip, offset);
237 }
238 }
239
240 if (use_sync_markers && !(evil_scene->toolsettings->lock_markers) && (markers != nullptr)) {
241 /* affect selected markers - it's unlikely that we will want to affect all in this way? */
242 LISTBASE_FOREACH (TimeMarker *, marker, markers) {
243 if (marker->flag & SELECT) {
244 marker->frame += offset;
245 }
246 }
247 }
248 }
249
250 return offset ? false : true;
251}
252
254 blender::Span<Strip *> transformed_strips)
255{
256 blender::VectorSet<Strip *> standalone_strips;
257
258 for (Strip *strip : transformed_strips) {
259 if ((strip->type & STRIP_TYPE_EFFECT) == 0 || strip->input1 == nullptr) {
260 standalone_strips.add(strip);
261 }
262 }
263 return standalone_strips;
264}
265
266/* Query strips positioned after left edge of transformed strips bound-box. */
268 const Scene *scene,
269 ListBase *seqbase,
270 blender::Span<Strip *> transformed_strips,
272{
273 int minframe = MAXFRAME;
274 {
275 for (Strip *strip : transformed_strips) {
276 minframe = min_ii(minframe, time_left_handle_frame_get(scene, strip));
277 }
278 }
279
280 blender::VectorSet<Strip *> right_side_strips;
281 LISTBASE_FOREACH (Strip *, strip, seqbase) {
282 if (!time_dependent_strips.is_empty() && time_dependent_strips.contains(strip)) {
283 continue;
284 }
285 if (transformed_strips.contains(strip)) {
286 continue;
287 }
288
289 if ((strip->flag & SELECT) == 0 && time_left_handle_frame_get(scene, strip) >= minframe) {
290 right_side_strips.add(strip);
291 }
292 }
293 return right_side_strips;
294}
295
296/* Offset all strips positioned after left edge of transformed strips bound-box by amount equal
297 * to overlap of transformed strips. */
299 ListBase *seqbasep,
300 blender::Span<Strip *> transformed_strips,
302 bool use_sync_markers)
303{
305
307 scene, seqbasep, transformed_strips, time_dependent_strips);
308
309 /* Temporarily move right side strips beyond timeline boundary. */
310 for (Strip *strip : right_side_strips) {
311 strip->channel += MAX_CHANNELS * 2;
312 }
313
314 /* Shuffle transformed standalone strips. This is because transformed strips can overlap with
315 * strips on left side. */
316 blender::VectorSet standalone_strips = extract_standalone_strips(transformed_strips);
318 standalone_strips, time_dependent_strips, seqbasep, scene, markers, use_sync_markers);
319
320 /* Move temporarily moved strips back to their original place and tag for shuffling. */
321 for (Strip *strip : right_side_strips) {
322 strip->channel -= MAX_CHANNELS * 2;
323 }
324 /* Shuffle again to displace strips on right side. Final effect shuffling is done in
325 * SEQ_transform_handle_overlap. */
326 transform_seqbase_shuffle_time(right_side_strips, seqbasep, scene, markers, use_sync_markers);
327}
328
330 const Scene *scene, ListBase *seqbasep, blender::Span<Strip *> transformed_strips)
331{
332 blender::VectorSet<Strip *> overwrite_targets = query_unselected_strips(seqbasep);
333
334 /* Effects of transformed strips can be unselected. These must not be included. */
335 overwrite_targets.remove_if([&](Strip *strip) { return transformed_strips.contains(strip); });
336 overwrite_targets.remove_if([&](Strip *strip) {
337 bool does_overlap = false;
338 for (Strip *strip_transformed : transformed_strips) {
339 if (transform_test_overlap(scene, strip, strip_transformed)) {
340 does_overlap = true;
341 }
342 }
343
344 return !does_overlap;
345 });
346
347 return overwrite_targets;
348}
349
351 /* No overlap. */
353 /* Overlapping strip covers overlapped completely. */
355 /* Overlapping strip is inside overlapped. */
357 /* Partial overlap between 2 strips. */
360};
361
363 const Strip *transformed,
364 const Strip *target)
365{
366 if (time_left_handle_frame_get(scene, transformed) <=
368 time_right_handle_frame_get(scene, transformed) >=
370 {
372 }
375 {
377 }
378 if (time_left_handle_frame_get(scene, transformed) <=
381 {
383 }
384 if (time_left_handle_frame_get(scene, transformed) <=
388 {
390 }
391 return STRIP_OVERLAP_NONE;
392}
393
394/* Split strip in 3 parts, remove middle part and fit transformed inside. */
396 ListBase *seqbasep,
397 const Strip *transformed,
398 Strip *target)
399{
400 /* Because we are doing a soft split, bmain is not used in SEQ_edit_strip_split, so we can
401 * pass nullptr here. */
402 Main *bmain = nullptr;
403
404 Strip *split_strip = edit_strip_split(bmain,
405 scene,
406 seqbasep,
407 target,
408 time_left_handle_frame_get(scene, transformed),
410 true,
411 nullptr);
412 edit_strip_split(bmain,
413 scene,
414 seqbasep,
415 split_strip,
418 true,
419 nullptr);
420 edit_flag_for_removal(scene, seqbasep, split_strip);
422}
423
424/* Trim strips by adjusting handle position.
425 * This is bit more complicated in case overlap happens on effect. */
427 ListBase *seqbasep,
428 const Strip *transformed,
429 Strip *target,
430 const eOvelapDescrition overlap)
431{
433 target, scene, seqbasep, query_strip_effect_chain);
434
435 /* Expand collection by adding all target's children, effects and their children. */
436 if ((target->type & STRIP_TYPE_EFFECT) != 0) {
438 }
439
440 /* Trim all non effects, that have influence on effect length which is overlapping. */
441 for (Strip *strip : targets) {
443 continue;
444 }
445 if (overlap == STRIP_OVERLAP_LEFT_SIDE) {
447 }
448 else {
451 }
452 }
453}
454
456 ListBase *seqbasep,
457 blender::Span<Strip *> transformed_strips)
458{
459 blender::VectorSet targets = query_overwrite_targets(scene, seqbasep, transformed_strips);
460 blender::VectorSet<Strip *> strips_to_delete;
461
462 for (Strip *target : targets) {
463 for (Strip *transformed : transformed_strips) {
464 if (transformed->channel != target->channel) {
465 continue;
466 }
467
468 const eOvelapDescrition overlap = overlap_description_get(scene, transformed, target);
469
470 if (overlap == STRIP_OVERLAP_IS_FULL) {
471 strips_to_delete.add(target);
472 }
473 else if (overlap == STRIP_OVERLAP_IS_INSIDE) {
474 strip_transform_handle_overwrite_split(scene, seqbasep, transformed, target);
475 }
477 strip_transform_handle_overwrite_trim(scene, seqbasep, transformed, target, overlap);
478 }
479 }
480 }
481
482 /* Remove covered strips. This must be done in separate loop, because
483 * `SEQ_edit_strip_split()` also uses `SEQ_edit_remove_flagged_sequences()`. See #91096. */
484 if (!strips_to_delete.is_empty()) {
485 for (Strip *strip : strips_to_delete) {
487 }
489 }
490}
491
493 ListBase *seqbasep,
494 blender::Span<Strip *> transformed_strips,
496 bool use_sync_markers)
497{
499
500 /* Shuffle non strips with no effects attached. */
501 blender::VectorSet standalone_strips = extract_standalone_strips(transformed_strips);
503 standalone_strips, time_dependent_strips, seqbasep, scene, markers, use_sync_markers);
504}
505
507 ListBase *seqbasep,
508 blender::Span<Strip *> transformed_strips,
509 bool use_sync_markers)
510{
512 transform_handle_overlap(scene, seqbasep, transformed_strips, empty_set, use_sync_markers);
513}
514
516 ListBase *seqbasep,
517 blender::Span<Strip *> transformed_strips,
519 bool use_sync_markers)
520{
522
523 switch (overlap_mode) {
526 scene, seqbasep, transformed_strips, time_dependent_strips, use_sync_markers);
527 break;
529 strip_transform_handle_overwrite(scene, seqbasep, transformed_strips);
530 break;
533 scene, seqbasep, transformed_strips, time_dependent_strips, use_sync_markers);
534 break;
535 }
536
537 /* If any effects still overlap, we need to move them up.
538 * In some cases other strips can be overlapping still, see #90646. */
539 for (Strip *strip : transformed_strips) {
540 if (transform_test_overlap(scene, seqbasep, strip)) {
542 }
543 strip->flag &= ~SEQ_OVERLAP;
544 }
545}
546
548 ListBase *seqbase,
549 const int delta,
550 const int timeline_frame)
551{
552 LISTBASE_FOREACH (Strip *, strip, seqbase) {
553 if (time_left_handle_frame_get(scene, strip) >= timeline_frame) {
556 }
557 }
558
561 if (marker->frame >= timeline_frame) {
562 marker->frame += delta;
563 }
564 }
565 }
566}
567
568void strip_channel_set(Strip *strip, int channel)
569{
570 strip->channel = math::clamp(channel, 1, MAX_CHANNELS);
571}
572
574{
575 const SeqTimelineChannel *channel = channel_get_by_index(channels, strip->channel);
576 return strip->flag & SEQ_LOCK ||
577 (channel_is_locked(channel) && ((strip->flag & SEQ_IGNORE_CHANNEL_LOCK) == 0));
578}
579
581{
582 float2 mirror(1.0f, 1.0f);
583
584 if ((strip->flag & SEQ_FLIPX) != 0) {
585 mirror.x = -1.0f;
586 }
587 if ((strip->flag & SEQ_FLIPY) != 0) {
588 mirror.y = -1.0f;
589 }
590 return mirror;
591}
592
594{
595 if (strip->type == STRIP_TYPE_IMAGE) {
596 const StripElem *selem = render_give_stripelem(scene, strip, scene->r.cfra);
597 if (selem != nullptr) {
598 return {float(selem->orig_width), float(selem->orig_height)};
599 }
600 }
601
602 if (strip->type == STRIP_TYPE_MOVIE) {
603 const StripElem *selem = strip->data->stripdata;
604 return {float(selem->orig_width), float(selem->orig_height)};
605 }
606
607 if (strip->type == STRIP_TYPE_SCENE && strip->scene != nullptr &&
608 (strip->flag & SEQ_SCENE_STRIPS) == 0)
609 {
610 return {float(strip->scene->r.xsch), float(strip->scene->r.ysch)};
611 }
612
614 const MovieClip *clip = strip->clip;
615 if (clip != nullptr && clip->lastsize[0] != 0 && clip->lastsize[1] != 0) {
616 return {float(clip->lastsize[0]), float(clip->lastsize[1])};
617 }
618 }
619
620 return {float(scene->r.xsch), float(scene->r.ysch)};
621}
622
624{
625 const float2 image_size = strip_raw_image_size_get(scene, strip);
627
628 const float2 origin(
629 (image_size[0] * transform->origin[0]) - (image_size[0] * 0.5f) + transform->xofs,
630 (image_size[1] * transform->origin[1]) - (image_size[1] * 0.5f) + transform->yofs);
631
632 const float2 viewport_pixel_aspect(scene->r.xasp / scene->r.yasp, 1.0f);
634
635 return origin * mirror * viewport_pixel_aspect;
636}
637
639 const Strip *strip,
640 bool apply_rotation = true)
641{
643 const float2 image_size = strip_raw_image_size_get(scene, strip);
644 const float2 origin(image_size.x * transform->origin[0], image_size[1] * transform->origin[1]);
645 const float2 translation(transform->xofs, transform->yofs);
646 const float rotation = apply_rotation ? transform->rotation : 0.0f;
647 const float2 scale(transform->scale_x, transform->scale_y);
648 const float2 pivot = origin - (image_size / 2);
649
650 const float3x3 matrix = math::from_loc_rot_scale<float3x3>(translation, rotation, scale);
651 return math::from_origin_transform(matrix, pivot);
652}
653
658
660 const Strip *strip,
661 bool apply_rotation)
662{
663 const float2 image_size = strip_raw_image_size_get(scene, strip);
664
665 const StripCrop *crop = strip->data->crop;
666 float2 quad[4]{
667 {(image_size[0] / 2) - crop->right, (image_size[1] / 2) - crop->top},
668 {(image_size[0] / 2) - crop->right, (-image_size[1] / 2) + crop->bottom},
669 {(-image_size[0] / 2) + crop->left, (-image_size[1] / 2) + crop->bottom},
670 {(-image_size[0] / 2) + crop->left, (image_size[1] / 2) - crop->top},
671 };
672
674 const float2 viewport_pixel_aspect(scene->r.xasp / scene->r.yasp, 1.0f);
676
677 Array<float2> quad_transformed;
678 quad_transformed.reinitialize(4);
679
680 for (int i = 0; i < 4; i++) {
681 const float2 point = math::transform_point(matrix, quad[i]);
682 quad_transformed[i] = point * mirror * viewport_pixel_aspect;
683 }
684 return quad_transformed;
685}
686
687Array<float2> image_transform_quad_get(const Scene *scene, const Strip *strip, bool apply_rotation)
688{
689 return strip_image_transform_quad_get_ex(scene, strip, apply_rotation);
690}
691
696
698{
699 return {co_src.x * scene->r.xsch, co_src.y * scene->r.ysch};
700}
701
703{
704 return {co_src.x / scene->r.xsch, co_src.y / scene->r.ysch};
705}
706
708{
709 return {float2(std::numeric_limits<float>::max()), float2(std::numeric_limits<float>::lowest())};
710}
711
714 bool apply_rotation)
715{
717
718 for (Strip *strip : strips) {
719 const Array<float2> quad = image_transform_quad_get(scene, strip, apply_rotation);
720 const Bounds<float2> strip_box = *blender::bounds::min_max(quad.as_span());
721 box = blender::bounds::merge(box, strip_box);
722 }
723
724 return box;
725}
726
727} // namespace blender::seq
#define BLI_assert(a)
Definition BLI_assert.h:46
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
#define ELEM(...)
eSeqOverlapMode
@ SEQ_OVERLAP_EXPAND
@ SEQ_OVERLAP_SHUFFLE
@ SEQ_OVERLAP_OVERWRITE
#define MAXFRAME
@ SEQ_SINGLE_FRAME_CONTENT
@ SEQ_FLIPX
@ SEQ_IGNORE_CHANNEL_LOCK
@ SEQ_SCENE_STRIPS
@ SEQ_FLIPY
@ STRIP_TYPE_SCENE
@ STRIP_TYPE_MOVIECLIP
@ STRIP_TYPE_IMAGE
@ STRIP_TYPE_MOVIE
@ STRIP_TYPE_EFFECT
@ STRIP_TYPE_META
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
void reinitialize(const int64_t new_size)
Definition BLI_array.hh:398
constexpr bool contains(const T &value) const
Definition BLI_span.hh:277
bool add(const Key &key)
int64_t remove_if(Predicate &&predicate)
#define SELECT
Scene scene
blender::gpu::Batch * quad
const vector< Marker > & markers
Bounds< T > merge(const Bounds< T > &a, const Bounds< T > &b)
Definition BLI_bounds.hh:26
std::optional< Bounds< T > > min_max(const std::optional< Bounds< T > > &a, const T &b)
Definition BLI_bounds.hh:55
T clamp(const T &a, const T &min, const T &max)
MatT from_origin_transform(const MatT &transform, const VectorT origin)
MatT from_loc_rot_scale(const typename MatT::loc_type &location, const RotationT &rotation, const VecBase< typename MatT::base_type, ScaleDim > &scale)
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
Strip * lookup_meta_by_strip(Editing *ed, const Strip *key)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
static void strip_transform_handle_overwrite_split(Scene *scene, ListBase *seqbasep, const Strip *transformed, Strip *target)
Array< float2 > image_transform_final_quad_get(const Scene *scene, const Strip *strip)
void relations_invalidate_cache(Scene *scene, Strip *strip)
static void strip_transform_handle_overlap_shuffle(Scene *scene, ListBase *seqbasep, blender::Span< Strip * > transformed_strips, blender::Span< Strip * > time_dependent_strips, bool use_sync_markers)
static void strip_transform_handle_overwrite_trim(Scene *scene, ListBase *seqbasep, const Strip *transformed, Strip *target, const eOvelapDescrition overlap)
SeqTimelineChannel * channel_get_by_index(const ListBase *channels, const int channel_index)
Definition channels.cc:65
ListBase * channels_displayed_get(const Editing *ed)
Definition channels.cc:28
void edit_remove_flagged_strips(Scene *scene, ListBase *seqbase)
static blender::VectorSet< Strip * > query_overwrite_targets(const Scene *scene, ListBase *seqbasep, blender::Span< Strip * > transformed_strips)
Bounds< float2 > image_transform_bounding_box_from_collection(Scene *scene, blender::Span< Strip * > strips, bool apply_rotation)
void edit_flag_for_removal(Scene *scene, ListBase *seqbase, Strip *strip)
float3x3 image_transform_matrix_get(const Scene *scene, const Strip *strip)
void transform_translate_strip(Scene *evil_scene, Strip *strip, int delta)
bool channel_is_locked(const SeqTimelineChannel *channel)
Definition channels.cc:81
VectorSet< Strip * > query_unselected_strips(ListBase *seqbase)
Definition iterator.cc:219
Array< float2 > image_transform_quad_get(const Scene *scene, const Strip *strip, bool apply_rotation)
void strip_channel_set(Strip *strip, int channel)
static void strip_transform_handle_overwrite(Scene *scene, ListBase *seqbasep, blender::Span< Strip * > transformed_strips)
bool transform_test_overlap(const Scene *scene, Strip *strip1, Strip *strip2)
Editing * editing_get(const Scene *scene)
Definition sequencer.cc:272
static blender::VectorSet< Strip * > extract_standalone_strips(blender::Span< Strip * > transformed_strips)
blender::Span< Strip * > SEQ_lookup_effects_by_strip(Editing *ed, const Strip *key)
static eOvelapDescrition overlap_description_get(const Scene *scene, const Strip *transformed, const Strip *target)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void offset_animdata(const Scene *scene, Strip *strip, float ofs)
Definition animation.cc:42
float2 image_transform_mirror_factor_get(const Strip *strip)
void query_strip_effect_chain(const Scene *scene, Strip *reference_strip, ListBase *seqbase, VectorSet< Strip * > &r_strips)
Definition iterator.cc:231
void strip_time_update_effects_strip_range(const Scene *scene, const blender::Span< Strip * > effects)
bool transform_single_image_check(const Strip *strip)
constexpr int MAX_CHANNELS
void time_update_meta_strip_range(const Scene *scene, Strip *strip_meta)
void iterator_set_expand(const Scene *scene, ListBase *seqbase, VectorSet< Strip * > &strips, void strip_query_func(const Scene *scene, Strip *strip_reference, ListBase *seqbase, VectorSet< Strip * > &strips))
Definition iterator.cc:82
static void strip_transform_handle_expand_to_fit(Scene *scene, ListBase *seqbasep, blender::Span< Strip * > transformed_strips, blender::Span< Strip * > time_dependent_strips, bool use_sync_markers)
void strip_time_translate_handles(const Scene *scene, Strip *strip, const int offset)
bool transform_seqbase_shuffle_ex(ListBase *seqbasep, Strip *test, Scene *evil_scene, int channel_delta)
static bool shuffle_strip_test_overlap(const Scene *scene, const Strip *strip1, const Strip *strip2, const int offset)
void transform_offset_after_frame(Scene *scene, ListBase *seqbase, const int delta, const int timeline_frame)
float2 strip_raw_image_size_get(const Scene *scene, const Strip *strip)
bool is_valid_strip_channel(const Strip *strip)
Definition sequencer.cc:715
float2 image_transform_origin_offset_pixelspace_get(const Scene *scene, const Strip *strip)
static Array< float2 > strip_image_transform_quad_get_ex(const Scene *scene, const Strip *strip, bool apply_rotation)
static Bounds< float2 > negative_bounds()
VectorSet< Strip * > query_by_reference(Strip *strip_reference, const Scene *scene, ListBase *seqbase, void strip_query_func(const Scene *scene, Strip *strip_reference, ListBase *seqbase, VectorSet< Strip * > &strips))
Definition iterator.cc:69
bool transform_seqbase_shuffle_time(blender::Span< Strip * > strips_to_shuffle, ListBase *seqbasep, Scene *evil_scene, ListBase *markers, const bool use_sync_markers)
bool transform_is_locked(ListBase *channels, const Strip *strip)
static blender::VectorSet< Strip * > query_right_side_strips(const Scene *scene, ListBase *seqbase, blender::Span< Strip * > transformed_strips, blender::Span< Strip * > time_dependent_strips)
bool relation_is_effect_of_strip(const Strip *effect, const Strip *input)
void time_left_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
static int shuffle_strip_time_offset_get(const Scene *scene, blender::Span< Strip * > strips_to_shuffle, ListBase *seqbasep, char dir)
bool channel_is_muted(const SeqTimelineChannel *channel)
Definition channels.cc:86
void transform_handle_overlap(Scene *scene, ListBase *seqbasep, blender::Span< Strip * > transformed_strips, bool use_sync_markers)
void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
bool transform_strip_can_be_translated(const Strip *strip)
Strip * edit_strip_split(Main *bmain, Scene *scene, ListBase *seqbase, Strip *strip, const int timeline_frame, const eSplitMethod method, const bool ignore_connections, const char **r_error)
float2 image_preview_unit_to_px(const Scene *scene, const float2 co_src)
bool transform_seqbase_shuffle(ListBase *seqbasep, Strip *test, Scene *evil_scene)
eSeqOverlapMode tool_settings_overlap_mode_get(Scene *scene)
Definition sequencer.cc:408
static float3x3 seq_image_transform_matrix_get_ex(const Scene *scene, const Strip *strip, bool apply_rotation=true)
StripElem * render_give_stripelem(const Scene *scene, const Strip *strip, int timeline_frame)
Definition render.cc:233
float2 image_preview_unit_from_px(const Scene *scene, const float2 co_src)
int effect_get_num_inputs(int strip_type)
Definition effects.cc:286
VecBase< float, 2 > float2
void * first
struct ToolSettings * toolsettings
struct Editing * ed
struct RenderData r
ListBase markers
StripCrop * crop
StripTransform * transform
StripElem * stripdata
struct Strip * input1
StripData * data
struct Scene * scene
struct MovieClip * clip
ListBase seqbase
struct Strip * next
struct Strip * input2
VectorSet< Strip * > time_dependent_strips