diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 1b0e20ec095..a4834caf709 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -71,7 +71,6 @@ #include "UI_view2d.h" #include "UI_interface.h" - /* own include */ #include "sequencer_intern.h" @@ -129,8 +128,9 @@ typedef struct TransSeq { /* ***************** proxy job manager ********************** */ typedef struct ProxyBuildJob { - Scene *scene; struct Main *main; + struct Depsgraph *depsgraph; + Scene *scene; ListBase queue; int stop; } ProxyJob; @@ -182,6 +182,7 @@ static void seq_proxy_build_job(const bContext *C) { wmJob *wm_job; ProxyJob *pj; + struct Depsgraph *depsgraph = CTX_data_depsgraph(C); Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); ScrArea *sa = CTX_wm_area(C); @@ -200,6 +201,7 @@ static void seq_proxy_build_job(const bContext *C) if (!pj) { pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job"); + pj->depsgraph = depsgraph; pj->scene = scene; pj->main = CTX_data_main(C); @@ -212,7 +214,7 @@ static void seq_proxy_build_job(const bContext *C) SEQP_BEGIN (ed, seq) { if ((seq->flag & SELECT)) { - BKE_sequencer_proxy_rebuild_context(pj->main, pj->scene, seq, file_list, &pj->queue); + BKE_sequencer_proxy_rebuild_context(pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue); } } SEQ_END @@ -1288,7 +1290,6 @@ typedef struct SlipData { int num_seq; bool slow; int slow_offset; /* offset at the point where offset was turned on */ - void *draw_handle; NumInput num_input; } SlipData; @@ -1323,21 +1324,6 @@ static void transseq_restore(TransSeq *ts, Sequence *seq) seq->len = ts->len; } -static void draw_slip_extensions(const bContext *C, ARegion *ar, void *data) -{ - Scene *scene = CTX_data_scene(C); - SlipData *td = data; - int i; - - for (i = 0; i < td->num_seq; i++) { - Sequence *seq = td->seq_array[i]; - - if ((seq->type != SEQ_TYPE_META) && td->trim[i]) { - draw_sequence_extensions(scene, ar, seq); - } - } -} - static int slip_add_sequences_rec(ListBase *seqbasep, Sequence **seq_array, bool *trim, int offset, bool do_trim) { Sequence *seq; @@ -1386,7 +1372,6 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve SlipData *data; Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); - ARegion *ar = CTX_wm_region(C); float mouseloc[2]; int num_seq, i; View2D *v2d = UI_view2d_fromcontext(C); @@ -1416,8 +1401,6 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve transseq_backup(data->ts + i, data->seq_array[i]); } - data->draw_handle = ED_region_draw_cb_activate(ar->type, draw_slip_extensions, data, REGION_DRAW_POST_VIEW); - UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &mouseloc[0], &mouseloc[1]); copy_v2_v2_int(data->init_mouse, event->mval); @@ -1559,7 +1542,6 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even Scene *scene = CTX_data_scene(C); SlipData *data = (SlipData *)op->customdata; ScrArea *sa = CTX_wm_area(C); - ARegion *ar = CTX_wm_region(C); const bool has_numInput = hasNumInput(&data->num_input); bool handled = true; @@ -1617,7 +1599,6 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even case RETKEY: case SPACEKEY: { - ED_region_draw_cb_exit(ar->type, data->draw_handle); MEM_freeN(data->seq_array); MEM_freeN(data->trim); MEM_freeN(data->ts); @@ -1646,8 +1627,6 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even BKE_sequence_calc(scene, seq); } - ED_region_draw_cb_exit(ar->type, data->draw_handle); - MEM_freeN(data->seq_array); MEM_freeN(data->ts); MEM_freeN(data->trim); @@ -3480,6 +3459,7 @@ static int sequencer_rebuild_proxy_invoke(bContext *C, wmOperator *UNUSED(op), static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) { Main *bmain = CTX_data_main(C); + struct Depsgraph *depsgraph = CTX_data_depsgraph(C); Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); Sequence *seq; @@ -3499,7 +3479,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) short stop = 0, do_update; float progress; - BKE_sequencer_proxy_rebuild_context(bmain, scene, seq, file_list, &queue); + BKE_sequencer_proxy_rebuild_context(bmain, depsgraph, scene, seq, file_list, &queue); for (link = queue.first; link; link = link->next) { struct SeqIndexBuildContext *context = link->data; |