[Bf-blender-cvs] [0e2f8ed8a6f] blender2.8: Depsgraph: Move strict checks under ifdef blocks

Sergey Sharybin noreply at git.blender.org
Thu Jul 20 09:44:13 CEST 2017


Commit: 0e2f8ed8a6f7daf40a5c009d9c26b38794159dcc
Author: Sergey Sharybin
Date:   Thu Jul 20 09:42:54 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB0e2f8ed8a6f7daf40a5c009d9c26b38794159dcc

Depsgraph: Move strict checks under ifdef blocks

Those checks are not always helpful, since id remapping doesn't want to
worry about which components to tag for update. Perhaps in the future we
will introduce special flag which would mean "tag everything possible"/

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

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

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

diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 561d21bc40b..67db6ae1467 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -67,6 +67,13 @@ extern "C" {
 #include "intern/depsgraph_intern.h"
 #include "util/deg_util_foreach.h"
 
+/* Define this in order to have more strict sanitization of what tagging flags
+ * are used for ID databnlocks. Ideally, we would always want this, but there
+ * are cases in generic modules (like IR remapping) where we don't want to spent
+ * lots of time trying to guess which components are to be updated.
+ */
+// #define STRICT_COMPONENT_TAGGING
+
 /* *********************** */
 /* Update Tagging/Flushing */
 
@@ -131,9 +138,11 @@ void id_tag_update_object_transform(Depsgraph *graph, IDDepsNode *id_node)
 	ComponentDepsNode *transform_comp =
 	        id_node->find_component(DEG_NODE_TYPE_TRANSFORM);
 	if (transform_comp == NULL) {
+#ifdef STRICT_COMPONENT_TAGGING
 		DEG_ERROR_PRINTF("ERROR: Unable to find transform component for %s\n",
 		                 id_node->id_orig->name);
 		BLI_assert(!"This is not supposed to happen!");
+#endif
 		return;
 	}
 	transform_comp->tag_update(graph);
@@ -170,9 +179,11 @@ void id_tag_update_object_data(Depsgraph *graph, IDDepsNode *id_node)
 			return;
 	}
 	if (data_comp == NULL) {
+#ifdef STRICT_COMPONENT_TAGGING
 		DEG_ERROR_PRINTF("ERROR: Unable to find data component for %s\n",
 		                 id_node->id_orig->name);
 		BLI_assert(!"This is not supposed to happen!");
+#endif
 		return;
 	}
 	data_comp->tag_update(graph);
@@ -211,9 +222,11 @@ void id_tag_update_particle(Depsgraph *graph, IDDepsNode *id_node)
 	ComponentDepsNode *particle_comp =
 	        id_node->find_component(DEG_NODE_TYPE_PARAMETERS);
 	if (particle_comp == NULL) {
+#ifdef STRICT_COMPONENT_TAGGING
 		DEG_ERROR_PRINTF("ERROR: Unable to find particle component for %s\n",
 		                 id_node->id_orig->name);
 		BLI_assert(!"This is not supposed to happen!");
+#endif
 		return;
 	}
 	particle_comp->tag_update(graph);




More information about the Bf-blender-cvs mailing list