104 const int orig_channel = test->
channel;
170 bool all_conflicts_resolved =
false;
172 while (!all_conflicts_resolved) {
173 all_conflicts_resolved =
true;
176 if (strips_to_shuffle.
contains(strip_other)) {
186 all_conflicts_resolved =
false;
209 const bool use_sync_markers)
213 strips_to_shuffle, empty_set, seqbasep, evil_scene,
markers, use_sync_markers);
221 const bool use_sync_markers)
225 int offset = (-offset_l < offset_r) ? offset_l : offset_r;
242 if (marker->flag &
SELECT) {
243 marker->frame += offset;
249 return offset ?
false :
true;
262 return standalone_strips;
292 return right_side_strips;
301 bool use_sync_markers)
336 bool does_overlap =
false;
337 for (
Strip *strip_transformed : transformed_strips) {
343 return !does_overlap;
346 return overwrite_targets;
362 const Strip *transformed,
396 const Strip *transformed,
401 Main *bmain =
nullptr;
427 const Strip *transformed,
461 for (
Strip *target : targets) {
462 for (
Strip *transformed : transformed_strips) {
463 if (transformed->channel != target->channel) {
470 strips_to_delete.
add(target);
495 bool use_sync_markers)
508 bool use_sync_markers)
518 bool use_sync_markers)
522 switch (overlap_mode) {
549 const int timeline_frame)
560 if (marker->frame >= timeline_frame) {
561 marker->frame += delta;
581 float2 mirror(1.0f, 1.0f);
621 return origin * mirror * viewport_pixel_aspect;
626 bool apply_rotation =
true)
632 const float rotation = apply_rotation ?
transform->rotation : 0.0f;
634 const float2 pivot = origin - (image_size / 2);
653 {(image_size[0] / 2) - crop->
right, (image_size[1] / 2) - crop->
top},
654 {(image_size[0] / 2) - crop->
right, (-image_size[1] / 2) + crop->
bottom},
655 {(-image_size[0] / 2) + crop->
left, (-image_size[1] / 2) + crop->
bottom},
656 {(-image_size[0] / 2) + crop->
left, (image_size[1] / 2) - crop->
top},
666 for (
int i = 0; i < 4; i++) {
668 quad_transformed[i] = point * mirror * viewport_pixel_aspect;
670 return quad_transformed;
685 return {co_src.x *
scene->
r.xsch, co_src.y *
scene->
r.ysch};
690 return {co_src.x /
scene->
r.xsch, co_src.y /
scene->
r.ysch};
695 return {
float2(std::numeric_limits<float>::max()),
float2(std::numeric_limits<float>::lowest())};
#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)
@ SEQ_SINGLE_FRAME_CONTENT
@ SEQ_IGNORE_CHANNEL_LOCK
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
void reinitialize(const int64_t new_size)
constexpr bool contains(const T &value) const
int64_t remove_if(Predicate &&predicate)
blender::gpu::Batch * quad
const vector< Marker > & markers
Bounds< T > merge(const Bounds< T > &a, const Bounds< T > &b)
std::optional< Bounds< T > > min_max(const std::optional< Bounds< T > > &a, const T &b)
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_OVERLAP_LEFT_SIDE
@ STRIP_OVERLAP_IS_INSIDE
@ STRIP_OVERLAP_RIGHT_SIDE
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)
ListBase * channels_displayed_get(const Editing *ed)
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)
VectorSet< Strip * > query_unselected_strips(ListBase *seqbase)
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)
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)
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)
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))
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)
bool is_valid_strip_channel(const Strip *strip)
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()
static float2 strip_raw_image_size_get(const Scene *scene, const Strip *strip)
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))
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)
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)
static float3x3 seq_image_transform_matrix_get_ex(const Scene *scene, const Strip *strip, bool apply_rotation=true)
float2 image_preview_unit_from_px(const Scene *scene, const float2 co_src)
int effect_get_num_inputs(int strip_type)
VecBase< float, 2 > float2
struct ToolSettings * toolsettings
StripTransform * transform