[Bf-blender-cvs] [0371ef1] master: Depsgraph: Only re-schedule objects which are on visible layers

Sergey Sharybin noreply at git.blender.org
Tue Dec 6 14:49:45 CET 2016


Commit: 0371ef16ee029a8a27938e4d29cb19cc96dc6194
Author: Sergey Sharybin
Date:   Tue Dec 6 14:48:48 2016 +0100
Branches: master
https://developer.blender.org/rB0371ef16ee029a8a27938e4d29cb19cc96dc6194

Depsgraph: Only re-schedule objects which are on visible layers

Otherwise it's possible to cause infinite update loop in Cycles viewport.

Gets a bit messy logic, need to revisit this..

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

M	source/blender/depsgraph/intern/builder/deg_builder.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index aedd006..cb2f057 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -154,19 +154,21 @@ void deg_graph_build_finalize(Depsgraph *graph)
 		}
 		GHASH_FOREACH_END();
 
-		ID *id = id_node->id;
-		if ((id->tag & LIB_TAG_ID_RECALC_ALL) &&
-		    (id->tag & LIB_TAG_DOIT))
-		{
-			id_node->tag_update(graph);
-			id->tag &= ~LIB_TAG_DOIT;
-		}
-		else if (GS(id->name) == ID_OB) {
-			Object *object = (Object *)id;
-			if (object->recalc & OB_RECALC_ALL) {
+		if ((id_node->layers & graph->layers) != 0) {
+			ID *id = id_node->id;
+			if ((id->tag & LIB_TAG_ID_RECALC_ALL) &&
+			    (id->tag & LIB_TAG_DOIT))
+			{
 				id_node->tag_update(graph);
 				id->tag &= ~LIB_TAG_DOIT;
 			}
+			else if (GS(id->name) == ID_OB) {
+				Object *object = (Object *)id;
+				if (object->recalc & OB_RECALC_ALL) {
+					id_node->tag_update(graph);
+					id->tag &= ~LIB_TAG_DOIT;
+				}
+			}
 		}
 		id_node->finalize_build();
 	}




More information about the Bf-blender-cvs mailing list