Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-22 12:40:18 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-22 12:40:18 +0300
commit51483bd49f19d9babd49e75941383ee8aa85098f (patch)
treefdd97fe27947bba29b7bc3d987f44055628ecad5 /source/blender/depsgraph
parent9729726aa85f460d34e62b81733371c321b18e48 (diff)
Depsgraph: Use proper debug print flags check
Was printing some tagging/evaluation prints when only building messages were requested.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_transitive.cc2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_intern.h4
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc2
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval.cc2
6 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index e01d5e53311..bcb70792af1 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -282,7 +282,7 @@ void DepsgraphRelationBuilder::add_time_relation(TimeSourceDepsNode *timesrc,
graph_->add_new_relation(timesrc, node_to, description, check_unique);
}
else {
- DEG_DEBUG_PRINTF("add_time_relation(%p = %s, %p = %s, %s) Failed\n",
+ DEG_DEBUG_PRINTF(BUILD, "add_time_relation(%p = %s, %p = %s, %s) Failed\n",
timesrc, (timesrc) ? timesrc->identifier().c_str() : "<None>",
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
description);
@@ -299,7 +299,7 @@ void DepsgraphRelationBuilder::add_operation_relation(
graph_->add_new_relation(node_from, node_to, description, check_unique);
}
else {
- DEG_DEBUG_PRINTF("add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
+ DEG_DEBUG_PRINTF(BUILD, "add_operation_relation(%p = %s, %p = %s, %s) Failed\n",
node_from, (node_from) ? node_from->identifier().c_str() : "<None>",
node_to, (node_to) ? node_to->identifier().c_str() : "<None>",
description);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 0e78ed61e5c..b9850209d7d 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -175,7 +175,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
}
}
- DEG_DEBUG_PRINTF("\nStarting IK Build: pchan = %s, target = (%s, %s), segcount = %d\n",
+ DEG_DEBUG_PRINTF(BUILD, "\nStarting IK Build: pchan = %s, target = (%s, %s), segcount = %d\n",
pchan->name, data->tar->id.name, data->subtarget, data->rootbone);
bPoseChannel *parchan = pchan;
@@ -218,7 +218,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
root_map->add_bone(parchan->name, rootchan->name);
/* continue up chain, until we reach target number of items... */
- DEG_DEBUG_PRINTF(" %d = %s\n", segcount, parchan->name);
+ DEG_DEBUG_PRINTF(BUILD, " %d = %s\n", segcount, parchan->name);
segcount++;
if ((segcount == data->rootbone) || (segcount > 255)) break; /* 255 is weak */
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
index 7731b76c6b9..12760cad73c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
@@ -117,7 +117,7 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
}
}
}
- DEG_DEBUG_PRINTF("Removed %d relations\n", num_removed_relations);
+ DEG_DEBUG_PRINTF(BUILD, "Removed %d relations\n", num_removed_relations);
}
} // namespace DEG
diff --git a/source/blender/depsgraph/intern/depsgraph_intern.h b/source/blender/depsgraph/intern/depsgraph_intern.h
index 87d3d5e0e07..2ac97c53db7 100644
--- a/source/blender/depsgraph/intern/depsgraph_intern.h
+++ b/source/blender/depsgraph/intern/depsgraph_intern.h
@@ -109,9 +109,9 @@ void deg_editors_id_update(struct Main *bmain, struct ID *id);
void deg_editors_scene_update(struct Main *bmain, struct Scene *scene, bool updated);
-#define DEG_DEBUG_PRINTF(...) \
+#define DEG_DEBUG_PRINTF(type, ...) \
do { \
- if (G.debug & G_DEBUG_DEPSGRAPH_BUILD) { \
+ if (G.debug & G_DEBUG_DEPSGRAPH_ ## type) { \
fprintf(stderr, __VA_ARGS__); \
} \
} while (0)
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 3ee7ef83320..948e4fc1f1b 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -180,7 +180,7 @@ void DEG_id_tag_update_ex(Main *bmain, ID *id, short flag)
/* Ideally should not happen, but old depsgraph allowed this. */
return;
}
- DEG_DEBUG_PRINTF("%s: id=%s flag=%d\n", __func__, id->name, flag);
+ DEG_DEBUG_PRINTF(TAG, "%s: id=%s flag=%d\n", __func__, id->name, flag);
lib_id_recalc_tag_flag(bmain, id, flag);
for (Scene *scene = (Scene *)bmain->scene.first;
scene != NULL;
diff --git a/source/blender/depsgraph/intern/eval/deg_eval.cc b/source/blender/depsgraph/intern/eval/deg_eval.cc
index 8ee66eddad6..18ad4d15985 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval.cc
@@ -256,7 +256,7 @@ void deg_evaluate_on_refresh(EvaluationContext *eval_ctx,
if (BLI_gset_len(graph->entry_tags) == 0) {
return;
}
- DEG_DEBUG_PRINTF("%s: layers:%u, graph->layers:%u\n",
+ DEG_DEBUG_PRINTF(EVAL, "%s: layers:%u, graph->layers:%u\n",
__func__,
layers,
graph->layers);