diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-29 18:42:04 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-01-29 19:54:20 +0300 |
commit | 9577ebde79cb5deb696f70fd7d218d8b358b0263 (patch) | |
tree | e23f22ba835578dc6753848b9ef2ce8d7ab3bd6f /source/blender/editors/render/render_update.c | |
parent | 006c66b1ff5972c5badff7a7f53f638e27e24cd4 (diff) |
Fix T53598: OpenGL Render Animation does not update shadows
General idea of the fix: skip the whole draw manager callback madness which
was used to tag object's engine specific data as dirty. Use generic recalc
flag in ObjectEngineData structure instead. This gives us the following
benefits;
- Sovles mentioned bug report.
- Avoids whole interface lookup for opened viewports for EVERY changed ID.
- Fixes missing updates when viewport is temporarily invisible.
Reviewers: dfelinto, fclem
Differential Revision: https://developer.blender.org/D3028
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r-- | source/blender/editors/render/render_update.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index eebe69b7a19..4943222f038 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -542,8 +542,6 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id) return; } Main *bmain = update_ctx->bmain; - Scene *scene = update_ctx->scene; - ViewLayer *view_layer = update_ctx->view_layer; /* Internal ID update handlers. */ switch (GS(id->name)) { case ID_MA: @@ -570,42 +568,6 @@ void ED_render_id_flush_update(const DEGEditorUpdateContext *update_ctx, ID *id) render_engine_flag_changed(bmain, RE_ENGINE_UPDATE_OTHER); break; } - /* Inform all draw managers about changes. - * - * TODO(sergey): This code is run for every updated ID, via flushing - * mechanism. How can we avoid iterating over the whole interface for - * every of those IDs? One of the ideas would be to call draw manager's - * ID update which is not bound to any of contexts. - */ - { - wmWindowManager *wm = bmain->wm.first; - for (wmWindow *win = wm->windows.first; win; win = win->next) { - bScreen *sc = WM_window_get_active_screen(win); - WorkSpace *workspace = BKE_workspace_active_get(win->workspace_hook); - ViewRender *view_render = BKE_viewrender_get(win->scene, workspace); - for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) { - if (sa->spacetype != SPACE_VIEW3D) { - continue; - } - for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) { - if (ar->regiontype != RGN_TYPE_WINDOW) { - continue; - } - RenderEngineType *engine_type = RE_engines_find(view_render->engine_id); - DRW_notify_id_update( - (&(DRWUpdateContext){ - .bmain = bmain, - .scene = scene, - .view_layer = view_layer, - .ar = ar, - .v3d = (View3D *)sa->spacedata.first, - .engine_type = engine_type - }), - id); - } - } - } - } } |