diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-20 10:42:54 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-20 10:44:09 +0300 |
commit | 0e2f8ed8a6f7daf40a5c009d9c26b38794159dcc (patch) | |
tree | aa9d6b623638d72f3b30a2c98c34b892d67f102c /source/blender | |
parent | 827dc700baf177a4fbf54e52cedc945eb4c60391 (diff) |
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"/
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 13 |
1 files changed, 13 insertions, 0 deletions
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); |