49 *r_error_str =
N_(
"Strips must be the same length");
54 if (strip_a->
type != strip_b->
type) {
56 *r_error_str =
N_(
"Strips were not compatible");
61 if (strip_a->is_effect() != strip_b->is_effect()) {
62 *r_error_str =
N_(
"Strips were not compatible");
66 if (strip_a->is_effect() && strip_b->is_effect()) {
68 *r_error_str =
N_(
"Strips must have the same number of inputs");
74 blender::dna::shallow_swap(*strip_a, *strip_b);
85 std::swap(strip_a->
prev, strip_b->
prev);
86 std::swap(strip_a->
next, strip_b->
next);
112 if (strip == strip_meta) {
119 if (strip->scene_sound) {
151 if (smd->mask_strip == strip) {
152 smd->mask_strip =
nullptr;
218 const char **r_error_str)
225 *r_error_str =
N_(
"Cannot move strip to non-meta strip");
229 if (src_strip == dst_stripm) {
230 *r_error_str =
N_(
"Strip cannot be moved into itself");
234 if (seqbase == &dst_stripm->
seqbase) {
235 *r_error_str =
N_(
"Moved strip is already inside provided meta strip");
240 *r_error_str =
N_(
"Moved strip is parent of provided meta strip");
245 *r_error_str =
N_(
"Cannot move strip to different scene");
250 strips.
add(src_strip);
253 for (
Strip *strip : strips) {
272 if (timeline_frame < content_start) {
273 const float offset = content_start + 1 - timeline_frame;
274 strip->
start -= offset;
278 else if ((timeline_frame >= content_start) && (timeline_frame <= content_end)) {
280 const float scene_fps =
float(scene->
r.frs_sec) /
float(scene->
r.frs_sec_base);
299 if ((timeline_frame >= content_start) && (timeline_frame <= content_end)) {
300 const float scene_fps =
float(scene->
r.frs_sec) /
float(scene->
r.frs_sec_base);
303 strip->
start = timeline_frame;
307 else if (timeline_frame > content_end) {
308 const float offset = timeline_frame - content_end + 1;
309 strip->
start += offset;
320 const int timeline_frame)
330 const int timeline_frame,
358 const int timeline_frame)
360 bool input_does_intersect =
false;
363 if (strip->
input1->is_effect()) {
365 scene, strip->
input1, timeline_frame);
370 if (strip->
input2->is_effect()) {
372 scene, strip->
input2, timeline_frame);
375 return input_does_intersect;
380 const int timeline_frame,
381 const char **r_error)
383 for (
Strip *strip : strips) {
386 *r_error =
"Strip is locked.";
389 if (!strip->is_effect()) {
399 *r_error =
"Splitting transition effect is not permitted.";
403 *r_error =
"Effect inputs don't overlap. Can not split such effect.";
414 const int timeline_frame,
416 const bool ignore_connections,
417 const char **r_error)
440 ListBase left_strips = {
nullptr,
nullptr};
441 for (
Strip *strip_iter : strips) {
446 if (ignore_connections) {
455 ListBase right_strips = {
nullptr,
nullptr};
461 Strip *return_strip =
nullptr;
469 Strip *strip_rename = right_strip;
470 for (; strip_rename; strip_rename = strip_rename->
next) {
475 while (left_strip && right_strip) {
482 else if (return_strip ==
nullptr) {
484 return_strip = right_strip;
488 bmain, scene, left_strip, right_strip, timeline_frame, method);
489 left_strip = left_strip->
next;
490 right_strip = right_strip->
next;
501 const int initial_frame,
502 const bool remove_all_gaps)
511 if (remove_all_gaps) {
void BKE_sound_mute_scene_sound(void *handle, bool mute)
void void void BLI_movelisttolist(ListBase *dst, ListBase *src) ATTR_NONNULL(1
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
char * STRNCPY(char(&dst)[N], const char *src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
int BLI_str_utf8_invalid_strip(char *str, size_t str_len) ATTR_NONNULL(1)
bool render_is_muted(const ListBase *channels, const Strip *strip)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
bool disconnect(Strip *strip)
void relations_invalidate_cache(Scene *scene, Strip *strip)
static void seq_split_set_left_hold_offset(Main *bmain, Scene *scene, Strip *strip, int timeline_frame)
ListBase * channels_displayed_get(const Editing *ed)
void edit_remove_flagged_strips(Scene *scene, ListBase *seqbase)
float time_content_end_frame_get(const Scene *scene, const Strip *strip)
void edit_flag_for_removal(Scene *scene, ListBase *seqbase, Strip *strip)
float time_media_playback_rate_factor_get(const Strip *strip, const float scene_fps)
bool transform_test_overlap(const Scene *scene, Strip *strip1, Strip *strip2)
Editing * editing_get(const Scene *scene)
ListBase * get_seqbase_by_strip(const Scene *scene, Strip *strip)
void edit_strip_name_set(Scene *scene, Strip *strip, const char *new_name)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void animation_duplicate_backup_to_scene(Scene *scene, Strip *strip, AnimationBackup *backup)
void seq_time_gap_info_get(const Scene *scene, ListBase *seqbase, const int initial_frame, GapInfo *r_gap_info)
void strip_free(Scene *scene, Strip *strip)
float time_start_frame_get(const Strip *strip)
void query_strip_effect_chain(const Scene *scene, Strip *reference_strip, ListBase *seqbase, VectorSet< Strip * > &r_strips)
int time_strip_length_get(const Scene *scene, const Strip *strip)
static void seq_split_set_right_hold_offset(Main *bmain, Scene *scene, Strip *strip, int timeline_frame)
void add_reload_new_file(Main *bmain, Scene *scene, Strip *strip, const bool lock_range)
void time_update_meta_strip_range(const Scene *scene, Strip *strip_meta)
void free_animdata(Scene *scene, Strip *strip)
bool edit_move_strip_to_meta(Scene *scene, Strip *src_strip, Strip *dst_stripm, const char **r_error_str)
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))
void transform_offset_after_frame(Scene *scene, ListBase *seqbase, const int delta, const int timeline_frame)
void edit_update_muting(Editing *ed)
static bool seq_edit_split_intersect_check(const Scene *scene, const Strip *strip, const int timeline_frame)
static void strip_update_muting_recursive(ListBase *channels, ListBase *seqbasep, Strip *strip_meta, const bool mute)
static bool seq_edit_split_operation_permitted_check(const Scene *scene, blender::Span< Strip * > strips, const int timeline_frame, const char **r_error)
void animation_backup_original(Scene *scene, AnimationBackup *backup)
static void seq_edit_split_handle_strip_offsets(Main *bmain, Scene *scene, Strip *left_strip, Strip *right_strip, const int timeline_frame, const eSplitMethod method)
static void sequencer_flag_users_for_removal(Scene *scene, ListBase *seqbase, Strip *strip)
bool edit_strip_swap(Scene *scene, Strip *strip_a, Strip *strip_b, const char **r_error_str)
bool transform_is_locked(ListBase *channels, const Strip *strip)
bool relation_is_effect_of_strip(const Strip *effect, const Strip *input)
void animation_restore_original(Scene *scene, AnimationBackup *backup)
static bool seq_edit_split_effect_inputs_intersect(const Scene *scene, const Strip *strip, const int timeline_frame)
void time_left_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
void query_strip_connected_and_effect_chain(const Scene *scene, Strip *reference_strip, ListBase *seqbase, VectorSet< Strip * > &r_strips)
void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
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)
void strip_lookup_invalidate(const Editing *ed)
void ensure_unique_name(Strip *strip, Scene *scene)
bool edit_remove_gaps(Scene *scene, ListBase *seqbase, const int initial_frame, const bool remove_all_gaps)
bool transform_seqbase_shuffle(ListBase *seqbasep, Strip *test, Scene *evil_scene)
bool exists_in_seqbase(const Strip *strip, const ListBase *seqbase)
void seqbase_duplicate_recursive(Main *bmain, const Scene *scene_src, Scene *scene_dst, ListBase *nseqbase, const ListBase *seqbase, const StripDuplicate dupe_flag, const int flag)
void strip_time_effect_range_set(const Scene *scene, Strip *strip)
bool edit_move_strip_to_seqbase(Scene *scene, ListBase *seqbase, Strip *strip, ListBase *dst_seqbase)
int effect_get_num_inputs(int strip_type)