From 709ce44617bf8c41b5bfe9a93aa58e9140323428 Mon Sep 17 00:00:00 2001 From: Richard Antalik Date: Tue, 24 Aug 2021 00:52:24 +0200 Subject: 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 --- source/blender/editors/space_sequencer/sequencer_edit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_sequencer') diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 9a2225a44c5..694e5fbb41d 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -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); + } } } -- cgit v1.2.3