diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-16 23:37:37 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-16 23:37:40 +0300 |
commit | 314542ffd4c845facee8dd09c5540dfe2bfe194e (patch) | |
tree | 6bee4032aec16caefbeab6d67486f547ff1a058e /source/blender/editors | |
parent | 73ca54283cb5e0367eb07556acf07fda7bb0fad1 (diff) |
Fix for objects trailing in viewport when using BI in scene+Eevee in workspace
Thanks for Clément Foucault for finding where to tackle.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_update.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index f160b71f633..f38b190b92c 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -38,6 +38,7 @@ #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_view3d_types.h" +#include "DNA_workspace_types.h" #include "DNA_world_types.h" #include "DNA_windowmanager_types.h" @@ -56,6 +57,7 @@ #include "BKE_node.h" #include "BKE_paint.h" #include "BKE_scene.h" +#include "BKE_workspace.h" #include "GPU_lamp.h" #include "GPU_material.h" @@ -113,7 +115,9 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) ARegion *ar; CTX_wm_window_set(C, win); - + WorkSpace *workspace = BKE_workspace_active_get(win->workspace_hook); + ViewRender *view_render = BKE_viewrender_get(win->scene, workspace); + for (sa = sc->areabase.first; sa; sa = sa->next) { if (sa->spacetype != SPACE_VIEW3D) continue; @@ -141,7 +145,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) engine->type->view_update(engine, C); } - else if ((RE_engines_find(scene->view_render.engine_id)->flag & RE_USE_LEGACY_PIPELINE) == 0) { + else if ((RE_engines_find(view_render->engine_id)->flag & RE_USE_LEGACY_PIPELINE) == 0) { if (updated) { CTX_wm_screen_set(C, sc); CTX_wm_area_set(C, sa); |