Fix T90407: Split fails on transition strips

When splitting strips, first they are duplicated and then offsets
adjusted. This can fail on cross transitions, because some strips don't
overlap with split frame.

All strips, that relate to each other must be duplicated to ensure
correct relations after splitting, so solution is to delete non
overlapping strips from left or right side respectively.

Since cross transition don't have to overlap with source strips,
splitting such strips would lead to effect being deleted, which
could cause crash when iterating over strips in python. Therefore
splitting of such strips is now forbidden and will generate error.

Splitting of transition will also generate error solely because such
operation is illogical.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D12121
This commit is contained in:
2021-08-24 00:52:24 +02:00
parent 24a3446787
commit 709ce44617
4 changed files with 123 additions and 20 deletions

View File

@@ -1446,9 +1446,14 @@ static int sequencer_split_exec(bContext *C, wmOperator *op)
}
if (ignore_selection || seq->flag & SELECT) {
if (SEQ_edit_strip_split(bmain, scene, ed->seqbasep, seq, split_frame, method) != NULL) {
const char *error_msg = NULL;
if (SEQ_edit_strip_split(bmain, scene, ed->seqbasep, seq, split_frame, method, &error_msg) !=
NULL) {
changed = true;
}
if (error_msg != NULL) {
BKE_report(op->reports, RPT_ERROR, error_msg);
}
}
}