diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-04-21 12:42:59 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-21 14:00:40 +0300 |
commit | 4b77fb30759d1b62224033fc92c55eef7f3e414a (patch) | |
tree | e861012341093bb46f19ee1d9952f4db76b4dad8 /source/blender/depsgraph/DEG_depsgraph_query.h | |
parent | 3540b507801461d30d6a856daa26efda15011f79 (diff) |
Move DEG_OBJECT_ITER inside depsgraph
Diffstat (limited to 'source/blender/depsgraph/DEG_depsgraph_query.h')
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index 430398c113f..9960a1e45e2 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -36,6 +36,7 @@ struct ID; struct Depsgraph; +struct Iterator; struct SceneLayer; #ifdef __cplusplus @@ -57,6 +58,22 @@ struct SceneLayer *DAG_get_scene_layer(struct Depsgraph *graph); /* Get the object as properly evaluated by depsgraph. */ struct Object *DAG_get_object(struct Depsgraph *depsgraph, struct Object *ob); +/* ************************ DAG iterators ********************* */ + +void DAG_objects_iterator_begin(struct Iterator *iter, void *data_in); +void DAG_objects_iterator_next(struct Iterator *iter); +void DAG_objects_iterator_end(struct Iterator *iter); + +/* Temporary hacky solution waiting for cow depsgrpah implementation. */ +#define DEG_OBJECT_ITER(graph_, instance_) \ + ITER_BEGIN(DAG_objects_iterator_begin, \ + DAG_objects_iterator_next, \ + DAG_objects_iterator_end, \ + graph_, Object *, instance_) + +#define DEG_OBJECT_ITER_END \ + ITER_END + #ifdef __cplusplus } /* extern "C" */ #endif |