diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-03 20:13:53 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-06 11:24:24 +0300 |
commit | f5964e6429490ef76ae0429f0e6cb88b47962bab (patch) | |
tree | 32415ea3cb7fba13c27e25f4c7e17f5ce457bd9f /source/blender/blenkernel | |
parent | ad557da78ac9426babcfa7cf28e54471747ed4c3 (diff) |
epsgraph: Use explicit graph API for sequencer
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 53b32bd7df8..6097aba4518 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3262,6 +3262,14 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq // have_seq = (scene->r.scemode & R_DOSEQ) && scene->ed && scene->ed->seqbase.first); /* UNUSED */ have_comp = (scene->r.scemode & R_DOCOMP) && scene->use_nodes && scene->nodetree; + /* Get depsgraph and scene layer for the strip. */ + SceneLayer *scene_layer = BKE_scene_layer_from_scene_get(scene); + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, scene_layer); + /* TODO(sergey): This is a temporary solution. */ + if (depsgraph == NULL) { + scene->depsgraph_legacy = depsgraph = DEG_graph_new(); + } + orig_data.scemode = scene->r.scemode; orig_data.cfra = scene->r.cfra; orig_data.subframe = scene->r.subframe; @@ -3311,10 +3319,10 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq /* opengl offscreen render */ context->eval_ctx->engine = RE_engines_find(scene->view_render.engine_id); - BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene); + BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene); ibuf = sequencer_view3d_cb( /* set for OpenGL render (NULL when scrubbing) */ - context->eval_ctx, scene, BKE_scene_layer_from_scene_get(scene), camera, width, height, IB_rect, + context->eval_ctx, scene, scene_layer, camera, width, height, IB_rect, context->scene->r.seq_prev_type, (context->scene->r.seq_flag & R_SEQ_SOLID_TEX) != 0, use_gpencil, use_background, scene->r.alphamode, @@ -3344,7 +3352,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq if (re == NULL) re = RE_NewSceneRender(scene); - BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene); + BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene); RE_BlenderFrame(re, context->bmain, scene, NULL, camera, scene->lay, frame, false); /* restore previous state after it was toggled on & off by RE_BlenderFrame */ @@ -3404,7 +3412,7 @@ finally: scene->r.subframe = orig_data.subframe; if (is_frame_update) { - BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene); + BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene); } #ifdef DURIAN_CAMERA_SWITCH |