diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-01 13:10:32 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-03 16:50:40 +0300 |
commit | e8f10d6475765685acee21ca5e8d48f568ee2031 (patch) | |
tree | 18c22ab179ba5af29c621935c22b1d23700602ab /source/blender/editors | |
parent | 6e4b7a6e4d96d60f92251abc7a5ff85fe0ba2fb8 (diff) |
Depsgraph: Tag sequencer for update on changes
Currently only adding, removing and transforming strips. Most likely more
tags is needed.
Diffstat (limited to 'source/blender/editors')
4 files changed, 14 insertions, 0 deletions
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); } |