diff options
Diffstat (limited to 'source/blender/editors/space_sequencer')
5 files changed, 21 insertions, 11 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 db6cc1af31e..190c2edf30c 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" @@ -351,6 +353,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_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -433,6 +436,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_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -515,6 +519,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_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -627,8 +632,8 @@ 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_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -956,6 +961,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_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1105,6 +1111,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_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index b9b310cf922..6197a7bd559 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -260,11 +260,6 @@ static void drawseqwave(View2D *v2d, return; } - if (!sound->spinlock) { - sound->spinlock = MEM_mallocN(sizeof(SpinLock), "sound_spinlock"); - BLI_spin_init(sound->spinlock); - } - BLI_spin_lock(sound->spinlock); if (!sound->waveform) { if (!(sound->tags & SOUND_TAGS_WAVEFORM_LOADING)) { diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index ed7205328eb..038ab0cc7cd 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" @@ -1809,7 +1811,7 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) } } - BKE_sequencer_update_muting(ed); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -1860,7 +1862,7 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) } } - BKE_sequencer_update_muting(ed); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -2370,6 +2372,7 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) ms = ms->prev; } + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -2625,7 +2628,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) MEM_freeN(ms); } - BKE_sequencer_update_muting(ed); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; @@ -2686,7 +2689,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) BKE_sequence_base_shuffle(ed->seqbasep, seqm, scene); } - BKE_sequencer_update_muting(ed); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seqm); @@ -2773,7 +2776,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) } BKE_sequencer_sort(scene); - BKE_sequencer_update_muting(ed); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); diff --git a/source/blender/editors/space_sequencer/sequencer_preview.c b/source/blender/editors/space_sequencer/sequencer_preview.c index 546c2a8a9f0..8a4e8c007f7 100644 --- a/source/blender/editors/space_sequencer/sequencer_preview.c +++ b/source/blender/editors/space_sequencer/sequencer_preview.c @@ -50,6 +50,7 @@ typedef struct PreviewJob { typedef struct PreviewJobAudio { struct PreviewJobAudio *next, *prev; + struct Main *bmain; bSound *sound; int lr; /* sample left or right */ int startframe; @@ -79,7 +80,9 @@ static void preview_startjob(void *data, short *stop, short *do_update, float *p PreviewJobAudio *preview_next; bSound *sound = previewjb->sound; + BKE_sound_load_audio(previewjb->bmain, sound); BKE_sound_read_waveform(sound, stop); + BKE_sound_free_audio(sound); if (*stop || G.is_break) { BLI_mutex_lock(pj->mutex); @@ -153,6 +156,7 @@ void sequencer_preview_add_sound(const bContext *C, Sequence *seq) /* attempt to lock mutex of job here */ + audiojob->bmain = CTX_data_main(C); audiojob->sound = seq->sound; BLI_mutex_lock(pj->mutex); |