[Bf-blender-cvs] [15f4aa182f8] blender2.8: Depsgraph: Relations builder should not tag ID in all depsgraphs

Sergey Sharybin noreply at git.blender.org
Fri Jul 6 14:46:38 CEST 2018


Commit: 15f4aa182f82bc0642d19eab58ee8b4a5182ac46
Author: Sergey Sharybin
Date:   Fri Jul 6 14:45:14 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB15f4aa182f82bc0642d19eab58ee8b4a5182ac46

Depsgraph: Relations builder should not tag ID in all depsgraphs

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

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

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index b6256e9ceb0..34da29652a4 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -69,7 +69,10 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
 			flag |= DEG_TAG_COPY_ON_WRITE;
 		}
 		if (flag != 0) {
-			DEG_id_tag_update_ex(bmain, id_node->id_orig, flag);
+			DEG_graph_id_tag_update(bmain,
+			                        (::Depsgraph*)graph,
+			                        id_node->id_orig,
+			                        flag);
 		}
 	}
 }
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 9128571155f..4229f8bf9a2 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -299,6 +299,7 @@ void depsgraph_tag_component(Depsgraph *graph,
  * explicitly, but not all areas are aware of this yet.
  */
 void deg_graph_id_tag_legacy_compat(Main *bmain,
+                                    Depsgraph *depsgraph,
                                     ID *id,
                                     eDepsgraph_Tag tag)
 {
@@ -309,7 +310,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
 				Object *object = (Object *)id;
 				ID *data_id = (ID *)object->data;
 				if (data_id != NULL) {
-					DEG_id_tag_update_ex(bmain, data_id, 0);
+					deg_graph_id_tag_update(bmain, depsgraph, data_id, 0);
 				}
 				break;
 			}
@@ -322,7 +323,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
 				Mesh *mesh = (Mesh *)id;
 				ID *key_id = &mesh->key->id;
 				if (key_id != NULL) {
-					DEG_id_tag_update_ex(bmain, key_id, 0);
+					deg_graph_id_tag_update(bmain, depsgraph, key_id, 0);
 				}
 				break;
 			}
@@ -331,7 +332,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
 				Lattice *lattice = (Lattice *)id;
 				ID *key_id = &lattice->key->id;
 				if (key_id != NULL) {
-					DEG_id_tag_update_ex(bmain, key_id, 0);
+					deg_graph_id_tag_update(bmain, depsgraph, key_id, 0);
 				}
 				break;
 			}
@@ -340,7 +341,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
 				Curve *curve = (Curve *)id;
 				ID *key_id = &curve->key->id;
 				if (key_id != NULL) {
-					DEG_id_tag_update_ex(bmain, key_id, 0);
+					deg_graph_id_tag_update(bmain, depsgraph, key_id, 0);
 				}
 				break;
 			}
@@ -396,7 +397,7 @@ static void deg_graph_id_tag_update_single_flag(Main *bmain,
 	/* TODO(sergey): Get rid of this once all areas are using proper data ID
 	 * for tagging.
 	 */
-	deg_graph_id_tag_legacy_compat(bmain, id, tag);
+	deg_graph_id_tag_legacy_compat(bmain, graph, id, tag);
 
 }
 
@@ -454,7 +455,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
 		comp_node->tag_update(graph);
 	}
 	GHASH_FOREACH_END();
-	deg_graph_id_tag_legacy_compat(bmain, id, (eDepsgraph_Tag)0);
+	deg_graph_id_tag_legacy_compat(bmain, graph, id, (eDepsgraph_Tag)0);
 }
 
 void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)



More information about the Bf-blender-cvs mailing list