diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-09 13:20:17 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-09 13:20:17 +0300 |
commit | d325e6f0e845d710abe4847a57be8e30920911a9 (patch) | |
tree | 13138d409459bbe7e223833a8f6a5000437585e6 /source/blender/editors/render/render_opengl.c | |
parent | c99481b6320a77e4793c812403f7d37dfc2d5ced (diff) |
Depsgraph: Make dependency graph to be built from scene layer
This is a final step of having proper ownership. Now selecting different
layers in the "top bar" will actually do what this is expected to do.
Surely, there are still things to be done under the hood, that will happen
in a less intrusive way.
Diffstat (limited to 'source/blender/editors/render/render_opengl.c')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 03cffa5a384..d436c562f19 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -812,8 +812,10 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender) } if (oglrender->timer) { /* exec will not have a timer */ + Depsgraph *depsgraph = oglrender->depsgraph; + SceneLayer *scene_layer = oglrender->scene_layer; scene->r.cfra = oglrender->cfrao; - BKE_scene_graph_update_for_newframe(bmain->eval_ctx, oglrender->depsgraph, bmain, scene); + BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, scene_layer); WM_event_remove_timer(oglrender->wm, oglrender->win, oglrender->timer); } @@ -1013,6 +1015,8 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); OGLRender *oglrender = op->customdata; Scene *scene = oglrender->scene; + SceneLayer *scene_layer = oglrender->scene_layer; + Depsgraph *depsgraph = oglrender->depsgraph; char name[FILE_MAX]; bool ok = false; const bool view_context = (oglrender->v3d != NULL); @@ -1023,7 +1027,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) if (CFRA < oglrender->nfra) CFRA++; while (CFRA < oglrender->nfra) { - BKE_scene_graph_update_for_newframe(bmain->eval_ctx, oglrender->depsgraph, bmain, scene); + BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, scene_layer); CFRA++; } @@ -1045,7 +1049,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) WM_cursor_time(oglrender->win, scene->r.cfra); - BKE_scene_graph_update_for_newframe(bmain->eval_ctx, oglrender->depsgraph, bmain, scene); + BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, scene_layer); if (view_context) { if (oglrender->rv3d->persp == RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) { |