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:
authorJoshua Leung <aligorith@gmail.com>2018-08-21 07:20:54 +0300
committerJoshua Leung <aligorith@gmail.com>2018-08-21 07:52:10 +0300
commit2a5f319465b2d94ddff1d3d1402d3c46e4e2c0e8 (patch)
tree1b54053ee672f3bc169e4e295bca84ee5c11d7ab /source/blender/depsgraph/DEG_depsgraph_query.h
parent351d13194d5e5c27278885fc6a7c5faaddd37e08 (diff)
Depsgraph: Add query methods to identify all the ID's that a given datablock depends on
This commit adds a new method, DEG_foreach_ancestor_ID() to accompany the existing DEG_foreach_descendent_ID(). It can be used to help print/collect all the ID's that a given ID block depends on (i.e. all the datablocks that need to be evaluated before the datablock of interest can be evaluated)
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_query.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h
index 1c4e11d1197..41650769fcf 100644
--- a/source/blender/depsgraph/DEG_depsgraph_query.h
+++ b/source/blender/depsgraph/DEG_depsgraph_query.h
@@ -197,6 +197,9 @@ typedef void (*DEGForeachIDCallback)(ID *id, void *user_data);
/* NOTE: Modifies runtime flags in depsgraph nodes, so can not be used in
* parallel. Keep an eye on that!
*/
+void DEG_foreach_ancestor_ID(const Depsgraph *depsgraph,
+ const ID *id,
+ DEGForeachIDCallback callback, void *user_data);
void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
const ID *id,
DEGForeachIDCallback callback, void *user_data);