diff options
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 15 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer_api.c | 4 |
4 files changed, 17 insertions, 10 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 01367302f94..5a201dbc962 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -199,7 +199,7 @@ int BKE_sequencer_recursive_apply(struct Sequence *seq, int (*apply_func)(struct void BKE_sequencer_free_clipboard(void); -void BKE_sequence_free(struct Scene *scene, struct Sequence *seq, const int do_cache); +void BKE_sequence_free(struct Scene *scene, struct Sequence *seq); const char *BKE_sequence_give_name(struct Sequence *seq); void BKE_sequence_calc(struct Scene *scene, struct Sequence *seq); void BKE_sequence_calc_disp(struct Scene *scene, struct Sequence *seq); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 849b08fbc2b..7d0c080a918 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -169,7 +169,8 @@ static void seq_free_strip(Strip *strip) MEM_freeN(strip); } -void BKE_sequence_free(Scene *scene, Sequence *seq, const int do_cache) +/* only give option to skip cache locally (static func) */ +static void BKE_sequence_free_ex(Scene *scene, Sequence *seq, const int do_cache) { if (seq->strip) seq_free_strip(seq->strip); @@ -219,6 +220,11 @@ void BKE_sequence_free(Scene *scene, Sequence *seq, const int do_cache) MEM_freeN(seq); } +void BKE_sequence_free(Scene *scene, Sequence *seq) +{ + BKE_sequence_free_ex(scene, seq, TRUE); +} + /* cache must be freed before calling this function * since it leaves the seqbase in an invalid state */ static void seq_free_sequence_recurse(Scene *scene, Sequence *seq) @@ -230,7 +236,7 @@ static void seq_free_sequence_recurse(Scene *scene, Sequence *seq) seq_free_sequence_recurse(scene, iseq); } - BKE_sequence_free(scene, seq, FALSE); + BKE_sequence_free_ex(scene, seq, FALSE); } @@ -251,7 +257,7 @@ static void seq_free_clipboard_recursive(Sequence *seq_parent) seq_free_clipboard_recursive(seq); } - BKE_sequence_free(NULL, seq_parent, FALSE); + BKE_sequence_free_ex(NULL, seq_parent, FALSE); } void BKE_sequencer_free_clipboard(void) @@ -290,7 +296,8 @@ void BKE_sequencer_editing_free(Scene *scene) SEQ_BEGIN (ed, seq) { - BKE_sequence_free(scene, seq, FALSE); + /* handle cache freeing above */ + BKE_sequence_free_ex(scene, seq, FALSE); } SEQ_END diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 17d4c9a6407..5a40c2ce4e7 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -613,7 +613,7 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de BLI_remlink(lb, seq); if (seq == last_seq) BKE_sequencer_active_set(scene, NULL); if (seq->type == SEQ_TYPE_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1); - BKE_sequence_free(scene, seq, TRUE); + BKE_sequence_free(scene, seq); } seq = seqn; } @@ -1812,7 +1812,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) start_ofs += step; } - BKE_sequence_free(scene, seq, TRUE); + BKE_sequence_free(scene, seq); seq = seq->next; } else { @@ -2010,7 +2010,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) last_seq->seqbase.last = NULL; BLI_remlink(ed->seqbasep, last_seq); - BKE_sequence_free(scene, last_seq, TRUE); + BKE_sequence_free(scene, last_seq); /* emtpy meta strip, delete all effects depending on it */ for (seq = ed->seqbasep->first; seq; seq = seq->next) diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 0445a7213d0..549868e5ed0 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -170,7 +170,7 @@ static Sequence *rna_Sequences_new_image(ID *id, Editing *ed, ReportList *report if (seq->strip->stripdata->name[0] == '\0') { BKE_report(reports, RPT_ERROR, "Sequences.new_image: unable to open image file"); BLI_remlink(&ed->seqbase, seq); - BKE_sequence_free(scene, seq, FALSE); /* cache won't have been generated */ + BKE_sequence_free(scene, seq); return NULL; } @@ -315,7 +315,7 @@ static void rna_Sequences_remove(ID *id, Editing *ed, Sequence *seq) Scene *scene = (Scene *)id; BLI_remlink(&ed->seqbase, seq); - BKE_sequence_free(scene, seq, TRUE); + BKE_sequence_free(scene, seq); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); } |