diff options
6 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index f682dadee8e..f7d7b76cb69 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -215,6 +215,9 @@ void depsgraph_tag_to_component_opcode(const ID *id, /* There is no such node in depsgraph, this tag is to be handled * separately. */ break; + case ID_RECALC_SEQUENCER: + *component_type = NodeType::SEQUENCER; + break; case ID_RECALC_ALL: case ID_RECALC_PSYS_ALL: BLI_assert(!"Should not happen"); @@ -615,6 +618,8 @@ const char *DEG_update_tag_as_string(IDRecalcFlag flag) return "POINT_CACHE"; case ID_RECALC_EDITORS: return "EDITORS"; + case ID_RECALC_SEQUENCER: + return "SEQUENCER"; case ID_RECALC_ALL: return "ALL"; } diff --git a/source/blender/editors/space_sequencer/CMakeLists.txt b/source/blender/editors/space_sequencer/CMakeLists.txt index 4668a9cef90..d57be0c85c3 100644 --- a/source/blender/editors/space_sequencer/CMakeLists.txt +++ b/source/blender/editors/space_sequencer/CMakeLists.txt @@ -21,6 +21,7 @@ set(INC ../../blenlib ../../blentranslation ../../gpu + ../../depsgraph ../../imbuf ../../makesdna ../../makesrna diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index b5bb79fb430..1cad9e4f734 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -64,6 +64,8 @@ # include <AUD_Sequence.h> #endif +#include "DEG_depsgraph.h" + /* own include */ #include "sequencer_intern.h" @@ -355,6 +357,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) sequencer_add_apply_replace_sel(C, op, seq); sequencer_add_apply_overlap(C, op, seq); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -441,6 +444,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) sequencer_add_apply_replace_sel(C, op, seq); sequencer_add_apply_overlap(C, op, seq); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -527,6 +531,7 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op) sequencer_add_apply_replace_sel(C, op, seq); sequencer_add_apply_overlap(C, op, seq); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -641,6 +646,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad BKE_sequencer_sort(scene); BKE_sequencer_update_muting(ed); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -968,6 +974,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) MEM_freeN(op->customdata); } + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1123,6 +1130,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) * it was NOT called in blender 2.4x, but wont hurt */ BKE_sequencer_sort(scene); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 94437d4871a..0f5c02327cc 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -64,6 +64,8 @@ #include "UI_view2d.h" #include "UI_interface.h" +#include "DEG_depsgraph.h" + /* own include */ #include "sequencer_intern.h" @@ -2379,6 +2381,7 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) ms = ms->prev; } + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8ddc5461e9a..a840c04ab5a 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1121,6 +1121,8 @@ static void recalcData_sequencer(TransInfo *t) seq_prev = seq; } + DEG_id_tag_update(&t->scene->id, ID_RECALC_SEQUENCER); + flushTransSeq(t); } diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index 5a666653043..12f59cf8e78 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -604,6 +604,10 @@ typedef enum IDRecalcFlag { */ ID_RECALC_COPY_ON_WRITE = (1 << 13), + /* Sequences in the sequencer did change. + * Use this tag with a scene ID which owns the sequences. */ + ID_RECALC_SEQUENCER = (1 << 14), + /*************************************************************************** * Pseudonyms, to have more semantic meaning in the actual code without * using too much low-level and implementation specific tags. */ |