diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-03 19:57:46 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-06 11:24:24 +0300 |
commit | d0e9352d32f6f28f09f98f0edfdfeaab82ca5309 (patch) | |
tree | 0980155fed7176584fe049484c1c661509e4fc4b /source/blender/editors/render/render_opengl.c | |
parent | bb3024ef1248f2d644a0ddde6f0e7e56c79be12f (diff) |
Depsgraph: Use explicit graph API for OpenGL render
Diffstat (limited to 'source/blender/editors/render/render_opengl.c')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index ec293c60d67..03cffa5a384 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -96,6 +96,7 @@ typedef struct OGLRender { Scene *scene; WorkSpace *workspace; SceneLayer *scene_layer; + Depsgraph *depsgraph; View3D *v3d; RegionView3D *rv3d; @@ -666,6 +667,7 @@ static bool screen_opengl_render_init(bContext *C, wmOperator *op) oglrender->scene = scene; oglrender->workspace = workspace; oglrender->scene_layer = CTX_data_scene_layer(C); + oglrender->depsgraph = CTX_data_depsgraph(C); oglrender->cfrao = scene->r.cfra; oglrender->write_still = is_write_still && !is_animation; @@ -811,7 +813,7 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender) if (oglrender->timer) { /* exec will not have a timer */ scene->r.cfra = oglrender->cfrao; - BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene); + BKE_scene_graph_update_for_newframe(bmain->eval_ctx, oglrender->depsgraph, bmain, scene); WM_event_remove_timer(oglrender->wm, oglrender->win, oglrender->timer); } @@ -1021,7 +1023,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) if (CFRA < oglrender->nfra) CFRA++; while (CFRA < oglrender->nfra) { - BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene); + BKE_scene_graph_update_for_newframe(bmain->eval_ctx, oglrender->depsgraph, bmain, scene); CFRA++; } @@ -1043,11 +1045,11 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) WM_cursor_time(oglrender->win, scene->r.cfra); - BKE_scene_update_for_newframe(bmain->eval_ctx, bmain, scene); + BKE_scene_graph_update_for_newframe(bmain->eval_ctx, oglrender->depsgraph, bmain, scene); if (view_context) { if (oglrender->rv3d->persp == RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) { - /* since BKE_scene_update_for_newframe() is used rather + /* since BKE_scene_graph_update_for_newframe() is used rather * then ED_update_for_newframe() the camera needs to be set */ if (BKE_scene_camera_switch_update(scene)) { oglrender->v3d->camera = scene->camera; |