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-05-02 17:31:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-05-02 18:09:44 +0300
commit3fa6b6ed4c7ad98d0002032e9ef77fa4024f28a5 (patch)
treefe5e51b2e07fc33a306be9e59ed4aacfb3a15ecc /source/blender/depsgraph/intern
parent7c32ef84aa1f6b0c5476b7da58b6d6d83660cdc7 (diff)
Depsgraph: Add function to iterate over all original IDs
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query_foreach.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query_foreach.cc b/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
index e6692cf49b3..b5ed3e38f09 100644
--- a/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query_foreach.cc
@@ -136,6 +136,14 @@ static void deg_foreach_dependent_ID(const Depsgraph *graph,
}
}
+static void deg_foreach_id(const Depsgraph *depsgraph,
+ DEGForeachIDCallback callback, void *user_data)
+{
+ foreach (const IDDepsNode *id_node, depsgraph->id_nodes) {
+ callback(id_node->id_orig, user_data);
+ }
+}
+
} // namespace DEG
void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
@@ -146,3 +154,9 @@ void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
id,
callback, user_data);
}
+
+void DEG_foreach_ID(const Depsgraph *depsgraph,
+ DEGForeachIDCallback callback, void *user_data)
+{
+ DEG::deg_foreach_id((const DEG::Depsgraph *)depsgraph, callback, user_data);
+}