diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 2 | ||||
-rw-r--r-- | source/blender/sequencer/intern/prefetch.c | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index e9f37fa6838..c1b483f27e8 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1950,6 +1950,8 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) Editing *ed = SEQ_editing_get(scene); Sequence *active_seq = SEQ_select_active_get(scene); + SEQ_prefetch_stop(scene); + if (active_seq && active_seq->type == SEQ_TYPE_META && active_seq->flag & SELECT) { /* Enter meta-strip. */ SEQ_meta_stack_alloc(ed, active_seq); diff --git a/source/blender/sequencer/intern/prefetch.c b/source/blender/sequencer/intern/prefetch.c index 0c45eb09492..42affae26ed 100644 --- a/source/blender/sequencer/intern/prefetch.c +++ b/source/blender/sequencer/intern/prefetch.c @@ -328,6 +328,20 @@ static void seq_prefetch_update_scene(Scene *scene) seq_prefetch_init_depsgraph(pfjob); } +static void seq_prefetch_update_active_seqbase(PrefetchJob *pfjob) +{ + MetaStack *ms_orig = SEQ_meta_stack_active_get(SEQ_editing_get(pfjob->scene)); + Editing *ed_eval = SEQ_editing_get(pfjob->scene_eval); + + if (ms_orig != NULL) { + Sequence *meta_eval = seq_prefetch_get_original_sequence(ms_orig->parseq, pfjob->scene_eval); + SEQ_seqbase_active_set(ed_eval, &meta_eval->seqbase); + } + else { + SEQ_seqbase_active_set(ed_eval, &ed_eval->seqbase); + } +} + static void seq_prefetch_resume(Scene *scene) { PrefetchJob *pfjob = seq_prefetch_job_get(scene); @@ -486,7 +500,7 @@ static void *seq_prefetch_frames(void *job) */ pfjob->scene_eval->ed->prefetch_job = pfjob; - ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(pfjob->scene)); + ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(pfjob->scene_eval)); if (seq_prefetch_must_skip_frame(pfjob, seqbase)) { pfjob->num_frames_prefetched++; continue; @@ -549,6 +563,7 @@ static PrefetchJob *seq_prefetch_start_ex(const SeqRenderData *context, float cf seq_prefetch_update_scene(context->scene); seq_prefetch_update_context(context); + seq_prefetch_update_active_seqbase(pfjob); BLI_threadpool_remove(&pfjob->threads, pfjob); BLI_threadpool_insert(&pfjob->threads, pfjob); |