diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-10-29 14:16:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-10-29 14:16:18 +0300 |
commit | 48f9e24f0c1e8ad97510a7a26a88c855be0ba6d7 (patch) | |
tree | a5a40b642980c21fcfbcf069f719e7bb3ec059a7 /source/blender/windowmanager/intern/wm_event_system.c | |
parent | b2411fe269caa80b61745209486ed0e8fca8bc79 (diff) |
Enable dependency graph update while rendering
It is a whole point of copy-on-write to make such updates safe.
If this causes an issues, we need to solve them.
Fixes T57302: Viewport (selection etc) not updated while rendering
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_system.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index e5901e40b71..e562053b62c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -314,27 +314,24 @@ void wm_event_do_depsgraph(bContext *C) Scene *scene = WM_window_get_active_scene(win); ViewLayer *view_layer = WM_window_get_active_view_layer(win); - /* XXX make lock in future, or separated derivedmesh users in scene */ - if (G.is_rendering == false) { - /* depsgraph & animation: update tagged datablocks */ - Main *bmain = CTX_data_main(C); - - /* copied to set's in scene_update_tagged_recursive() */ - scene->customdata_mask = win_combine_v3d_datamask; - - /* XXX, hack so operators can enforce datamasks [#26482], gl render */ - scene->customdata_mask |= scene->customdata_mask_modal; - - /* TODO(sergey): For now all dependency graphs which are evaluated from - * workspace are considered active. This will work all fine with "locked" - * view layer and time across windows. This is to be granted separately, - * and for until then we have to accept ambiguities when object is shared - * across visible view layers and has overrides on it. - */ - Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); - DEG_make_active(depsgraph); - BKE_scene_graph_update_tagged(depsgraph, bmain); - } + /* depsgraph & animation: update tagged datablocks */ + Main *bmain = CTX_data_main(C); + + /* copied to set's in scene_update_tagged_recursive() */ + scene->customdata_mask = win_combine_v3d_datamask; + + /* XXX, hack so operators can enforce datamasks [#26482], gl render */ + scene->customdata_mask |= scene->customdata_mask_modal; + + /* TODO(sergey): For now all dependency graphs which are evaluated from + * workspace are considered active. This will work all fine with "locked" + * view layer and time across windows. This is to be granted separately, + * and for until then we have to accept ambiguities when object is shared + * across visible view layers and has overrides on it. + */ + Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true); + DEG_make_active(depsgraph); + BKE_scene_graph_update_tagged(depsgraph, bmain); } } |