From 2a5f319465b2d94ddff1d3d1402d3c46e4e2c0e8 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 21 Aug 2018 16:20:54 +1200 Subject: 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) --- source/blender/depsgraph/DEG_depsgraph_query.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h') 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); -- cgit v1.2.3