[Bf-blender-cvs] [48f9e24f0c1] blender2.8: Enable dependency graph update while rendering

Sergey Sharybin noreply at git.blender.org
Mon Oct 29 12:17:37 CET 2018


Commit: 48f9e24f0c1e8ad97510a7a26a88c855be0ba6d7
Author: Sergey Sharybin
Date:   Mon Oct 29 12:16:18 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB48f9e24f0c1e8ad97510a7a26a88c855be0ba6d7

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

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

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);
 	}
 }



More information about the Bf-blender-cvs mailing list