diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-07-26 17:07:34 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-07-26 17:07:34 +0300 |
commit | 076d033e10eee29bfc8315344bd2ba1f0951ad06 (patch) | |
tree | 9861aee399c69116a5804bd89215f2f93b5fe642 /source/blender/makesrna/intern/rna_sequencer_api.c | |
parent | f0e370a65083419049900c51cdca0d9d3d44f749 (diff) |
VSE: Refactor delete operator and API
Operator logic is limited to iterating over selection and executing
same code as python API does.
Functional changes:
- No attempt to preserve effects is made. Dependant effects are deleted.
- No attempt to change meta strip boundaries.
Partially fixes T73828
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D6892
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 4157747455d..59cedf8fcb8 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -370,13 +370,14 @@ static void rna_Sequences_remove( Sequence *seq = seq_ptr->data; Scene *scene = (Scene *)id; - if (BLI_remlink_safe(&ed->seqbase, seq) == false) { + if (BLI_findindex(&ed->seqbase, seq) == -1) { BKE_reportf( reports, RPT_ERROR, "Sequence '%s' not in scene '%s'", seq->name + 2, scene->id.name + 2); return; } - BKE_sequence_free(scene, seq, true); + BKE_sequencer_flag_for_removal(scene, &ed->seqbase, seq); + BKE_sequencer_remove_flagged_sequences(scene, &ed->seqbase); RNA_POINTER_INVALIDATE(seq_ptr); DEG_relations_tag_update(bmain); |