diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-05-24 12:45:56 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-05-24 15:48:51 +0300 |
commit | 2da7977e3ef50049e0ebc4f0f668ce4ef2231a54 (patch) | |
tree | ee55cf7b465aee95bbe3231f9ac2b6a7f2615ae0 /source/blender/depsgraph/intern/builder/deg_builder_relations.h | |
parent | 089175bb1f6cb1105bc9d47a12bbc863c0df2a7f (diff) |
Depsgraph: Implement backtrace functionality
The goal is to make it easier to track down sources of errors during
the dependency graph builder.
With this change whenever a relation can not be added a trace to the
entity which requested the relation will be printed. For example:
```
Failed to add relation "Copy Location"
Could not find op_from: OperationKey(type: BONE, component name: 'MissingBone', operation code: BONE_DONE)
Trace:
Depth Type Name
----- ---- ----
1 Object Armature.001
2 Pose Channel Bone
3 Constraint Copy Location
```
On an implementation detail traced places where `checkIsBuiltAndTag`
is called, with some additional places to help tracking pose channels,
constraints, and modifiers.
Further improvements in granularity are possible, but that could happen
as a followup development once the core part is proven to work.
An example of such improvement would be to have entries in the trace
which will indicate NLA and drivers building. Currently it might be
a bit confusing to see IDs in the trace referenced from driver.
Even with such limitation the current state of the patch brings a
very valuable information (some information is much better than no
information at all).
Differential Revision: https://developer.blender.org/D15017
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index 1ccecc9a3f2..64bdd2334d8 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -23,6 +23,7 @@ #include "intern/builder/deg_builder.h" #include "intern/builder/deg_builder_map.h" #include "intern/builder/deg_builder_rna.h" +#include "intern/builder/deg_builder_stack.h" #include "intern/depsgraph.h" #include "intern/node/deg_node.h" #include "intern/node/deg_node_component.h" @@ -363,6 +364,7 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder { BuilderMap built_map_; RNANodeQuery rna_node_query_; + BuilderStack stack_; }; struct DepsNodeHandle { |