diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_collection.h | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_layer.h | 24 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 34 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_iterator.h | 10 | ||||
-rw-r--r-- | source/blender/depsgraph/DEG_depsgraph_query.h | 8 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query.cc | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_depsgraph.c | 8 |
8 files changed, 59 insertions, 59 deletions
diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h index 4111b9848bb..35d8f336207 100644 --- a/source/blender/blenkernel/BKE_collection.h +++ b/source/blender/blenkernel/BKE_collection.h @@ -35,7 +35,7 @@ extern "C" { #endif -struct Iterator; +struct BLI_Iterator; struct SceneCollection; struct Object; struct Base; @@ -67,13 +67,13 @@ void BKE_scene_collections_callback(struct Scene *scene, BKE_scene_collections_C void BKE_scene_objects_callback(struct Scene *scene, BKE_scene_objects_Cb callback, void *data); /* iterators */ -void BKE_scene_collections_iterator_begin(struct Iterator *iter, void *data_in); -void BKE_scene_collections_iterator_next(struct Iterator *iter); -void BKE_scene_collections_iterator_end(struct Iterator *iter); +void BKE_scene_collections_iterator_begin(struct BLI_Iterator *iter, void *data_in); +void BKE_scene_collections_iterator_next(struct BLI_Iterator *iter); +void BKE_scene_collections_iterator_end(struct BLI_Iterator *iter); -void BKE_scene_objects_iterator_begin(struct Iterator *iter, void *data_in); -void BKE_scene_objects_iterator_next(struct Iterator *iter); -void BKE_scene_objects_iterator_end(struct Iterator *iter); +void BKE_scene_objects_iterator_begin(struct BLI_Iterator *iter, void *data_in); +void BKE_scene_objects_iterator_next(struct BLI_Iterator *iter); +void BKE_scene_objects_iterator_end(struct BLI_Iterator *iter); #define FOREACH_SCENE_COLLECTION(scene, _instance) \ ITER_BEGIN(BKE_scene_collections_iterator_begin, \ diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index be4b40b90ff..decba7c2ace 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -156,21 +156,21 @@ void BKE_layer_eval_layer_collection_post(struct EvaluationContext *eval_ctx, /* iterators */ -void BKE_selected_objects_iterator_begin(Iterator *iter, void *data_in); -void BKE_selected_objects_iterator_next(Iterator *iter); -void BKE_selected_objects_iterator_end(Iterator *iter); +void BKE_selected_objects_iterator_begin(BLI_Iterator *iter, void *data_in); +void BKE_selected_objects_iterator_next(BLI_Iterator *iter); +void BKE_selected_objects_iterator_end(BLI_Iterator *iter); -void BKE_visible_objects_iterator_begin(Iterator *iter, void *data_in); -void BKE_visible_objects_iterator_next(Iterator *iter); -void BKE_visible_objects_iterator_end(Iterator *iter); +void BKE_visible_objects_iterator_begin(BLI_Iterator *iter, void *data_in); +void BKE_visible_objects_iterator_next(BLI_Iterator *iter); +void BKE_visible_objects_iterator_end(BLI_Iterator *iter); -void BKE_selected_bases_iterator_begin(Iterator *iter, void *data_in); -void BKE_selected_bases_iterator_next(Iterator *iter); -void BKE_selected_bases_iterator_end(Iterator *iter); +void BKE_selected_bases_iterator_begin(BLI_Iterator *iter, void *data_in); +void BKE_selected_bases_iterator_next(BLI_Iterator *iter); +void BKE_selected_bases_iterator_end(BLI_Iterator *iter); -void BKE_visible_bases_iterator_begin(Iterator *iter, void *data_in); -void BKE_visible_bases_iterator_next(Iterator *iter); -void BKE_visible_bases_iterator_end(Iterator *iter); +void BKE_visible_bases_iterator_begin(BLI_Iterator *iter, void *data_in); +void BKE_visible_bases_iterator_next(BLI_Iterator *iter); +void BKE_visible_bases_iterator_end(BLI_Iterator *iter); #define FOREACH_SELECTED_OBJECT(sl, _instance) \ ITER_BEGIN(BKE_selected_objects_iterator_begin, \ diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 992c5d706a6..7d265b8fd02 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -508,7 +508,7 @@ static void scene_collections_array(Scene *scene, SceneCollection ***collections * Only use this in non-performance critical situations * (it iterates over all scene collections twice) */ -void BKE_scene_collections_iterator_begin(Iterator *iter, void *data_in) +void BKE_scene_collections_iterator_begin(BLI_Iterator *iter, void *data_in) { Scene *scene = data_in; SceneCollectionsIteratorData *data = MEM_callocN(sizeof(SceneCollectionsIteratorData), __func__); @@ -524,7 +524,7 @@ void BKE_scene_collections_iterator_begin(Iterator *iter, void *data_in) iter->valid = true; } -void BKE_scene_collections_iterator_next(struct Iterator *iter) +void BKE_scene_collections_iterator_next(struct BLI_Iterator *iter) { SceneCollectionsIteratorData *data = iter->data; @@ -536,7 +536,7 @@ void BKE_scene_collections_iterator_next(struct Iterator *iter) } } -void BKE_scene_collections_iterator_end(struct Iterator *iter) +void BKE_scene_collections_iterator_end(struct BLI_Iterator *iter) { SceneCollectionsIteratorData *data = iter->data; @@ -555,10 +555,10 @@ void BKE_scene_collections_iterator_end(struct Iterator *iter) typedef struct SceneObjectsIteratorData { GSet *visited; LinkData *link; - Iterator scene_collection_iter; + BLI_Iterator scene_collection_iter; } SceneObjectsIteratorData; -void BKE_scene_objects_iterator_begin(Iterator *iter, void *data_in) +void BKE_scene_objects_iterator_begin(BLI_Iterator *iter, void *data_in) { Scene *scene = data_in; SceneObjectsIteratorData *data = MEM_callocN(sizeof(SceneObjectsIteratorData), __func__); @@ -598,7 +598,7 @@ static LinkData *object_base_unique(GSet *gs, LinkData *link) } } -void BKE_scene_objects_iterator_next(Iterator *iter) +void BKE_scene_objects_iterator_next(BLI_Iterator *iter) { SceneObjectsIteratorData *data = iter->data; LinkData *link = data->link ? object_base_unique(data->visited, data->link->next) : NULL; @@ -629,7 +629,7 @@ void BKE_scene_objects_iterator_next(Iterator *iter) } } -void BKE_scene_objects_iterator_end(Iterator *iter) +void BKE_scene_objects_iterator_end(BLI_Iterator *iter) { SceneObjectsIteratorData *data = iter->data; if (data) { diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index fddffa63a59..111408a01af 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -60,7 +60,7 @@ static IDProperty *collection_engine_settings_create(struct EngineSettingsCB_Typ static IDProperty *collection_engine_get(IDProperty *root, const int type, const char *engine_name); static void collection_engine_settings_init(IDProperty *root, const bool populate); static void layer_engine_settings_init(IDProperty *root, const bool populate); -static void object_bases_Iterator_next(Iterator *iter, const int flag); +static void object_bases_Iterator_next(BLI_Iterator *iter, const int flag); /* RenderLayer */ @@ -1586,7 +1586,7 @@ void BKE_scene_layer_engine_settings_validate_layer(SceneLayer *sl) /* ---------------------------------------------------------------------- */ /* Iterators */ -static void object_bases_Iterator_begin(Iterator *iter, void *data_in, const int flag) +static void object_bases_Iterator_begin(BLI_Iterator *iter, void *data_in, const int flag) { SceneLayer *sl = data_in; Base *base = sl->object_bases.first; @@ -1608,7 +1608,7 @@ static void object_bases_Iterator_begin(Iterator *iter, void *data_in, const int } } -static void object_bases_Iterator_next(Iterator *iter, const int flag) +static void object_bases_Iterator_next(BLI_Iterator *iter, const int flag) { Base *base = ((Base *)iter->data)->next; @@ -1625,7 +1625,7 @@ static void object_bases_Iterator_next(Iterator *iter, const int flag) iter->valid = false; } -static void objects_Iterator_begin(Iterator *iter, void *data_in, const int flag) +static void objects_Iterator_begin(BLI_Iterator *iter, void *data_in, const int flag) { object_bases_Iterator_begin(iter, data_in, flag); @@ -1634,7 +1634,7 @@ static void objects_Iterator_begin(Iterator *iter, void *data_in, const int flag } } -static void objects_Iterator_next(Iterator *iter, const int flag) +static void objects_Iterator_next(BLI_Iterator *iter, const int flag) { object_bases_Iterator_next(iter, flag); @@ -1643,62 +1643,62 @@ static void objects_Iterator_next(Iterator *iter, const int flag) } } -void BKE_selected_objects_iterator_begin(Iterator *iter, void *data_in) +void BKE_selected_objects_iterator_begin(BLI_Iterator *iter, void *data_in) { objects_Iterator_begin(iter, data_in, BASE_SELECTED); } -void BKE_selected_objects_iterator_next(Iterator *iter) +void BKE_selected_objects_iterator_next(BLI_Iterator *iter) { objects_Iterator_next(iter, BASE_SELECTED); } -void BKE_selected_objects_iterator_end(Iterator *UNUSED(iter)) +void BKE_selected_objects_iterator_end(BLI_Iterator *UNUSED(iter)) { /* do nothing */ } -void BKE_visible_objects_iterator_begin(Iterator *iter, void *data_in) +void BKE_visible_objects_iterator_begin(BLI_Iterator *iter, void *data_in) { objects_Iterator_begin(iter, data_in, BASE_VISIBLED); } -void BKE_visible_objects_iterator_next(Iterator *iter) +void BKE_visible_objects_iterator_next(BLI_Iterator *iter) { objects_Iterator_next(iter, BASE_VISIBLED); } -void BKE_visible_objects_iterator_end(Iterator *UNUSED(iter)) +void BKE_visible_objects_iterator_end(BLI_Iterator *UNUSED(iter)) { /* do nothing */ } -void BKE_selected_bases_iterator_begin(Iterator *iter, void *data_in) +void BKE_selected_bases_iterator_begin(BLI_Iterator *iter, void *data_in) { object_bases_Iterator_begin(iter, data_in, BASE_SELECTED); } -void BKE_selected_bases_iterator_next(Iterator *iter) +void BKE_selected_bases_iterator_next(BLI_Iterator *iter) { object_bases_Iterator_next(iter, BASE_SELECTED); } -void BKE_selected_bases_iterator_end(Iterator *UNUSED(iter)) +void BKE_selected_bases_iterator_end(BLI_Iterator *UNUSED(iter)) { /* do nothing */ } -void BKE_visible_bases_iterator_begin(Iterator *iter, void *data_in) +void BKE_visible_bases_iterator_begin(BLI_Iterator *iter, void *data_in) { object_bases_Iterator_begin(iter, data_in, BASE_VISIBLED); } -void BKE_visible_bases_iterator_next(Iterator *iter) +void BKE_visible_bases_iterator_next(BLI_Iterator *iter) { object_bases_Iterator_next(iter, BASE_VISIBLED); } -void BKE_visible_bases_iterator_end(Iterator *UNUSED(iter)) +void BKE_visible_bases_iterator_end(BLI_Iterator *UNUSED(iter)) { /* do nothing */ } diff --git a/source/blender/blenlib/BLI_iterator.h b/source/blender/blenlib/BLI_iterator.h index 26d2728d432..a2ec21d89b3 100644 --- a/source/blender/blenlib/BLI_iterator.h +++ b/source/blender/blenlib/BLI_iterator.h @@ -27,20 +27,20 @@ * \ingroup bli */ -typedef struct Iterator { +typedef struct BLI_Iterator { void *current; /* current pointer we iterate over */ void *data; /* stored data required for this iterator */ bool valid; -} Iterator; +} BLI_Iterator; -typedef void (*IteratorCb)(Iterator *iter); -typedef void (*IteratorBeginCb)(Iterator *iter, void *data_in); +typedef void (*IteratorCb)(BLI_Iterator *iter); +typedef void (*IteratorBeginCb)(BLI_Iterator *iter, void *data_in); #define ITER_BEGIN(callback_begin, callback_next, callback_end, _data_in, _type, _instance) \ { \ _type _instance; \ IteratorCb callback_end_func = callback_end; \ - Iterator iter_macro; \ + BLI_Iterator iter_macro; \ for (callback_begin(&iter_macro, (_data_in)); \ iter_macro.valid; \ callback_next(&iter_macro)) \ diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index 9960a1e45e2..b1d914666d6 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -36,7 +36,7 @@ struct ID; struct Depsgraph; -struct Iterator; +struct BLI_Iterator; struct SceneLayer; #ifdef __cplusplus @@ -60,9 +60,9 @@ 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); +void DAG_objects_iterator_begin(struct BLI_Iterator *iter, void *data_in); +void DAG_objects_iterator_next(struct BLI_Iterator *iter); +void DAG_objects_iterator_end(struct BLI_Iterator *iter); /* Temporary hacky solution waiting for cow depsgrpah implementation. */ #define DEG_OBJECT_ITER(graph_, instance_) \ diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index eff1a44be01..28e2b6d4ce6 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -105,7 +105,7 @@ typedef struct DAGObjectsIteratorData { int flag; } DAGObjectsIteratorData; -void DAG_objects_iterator_begin(Iterator *iter, void *data_in) +void DAG_objects_iterator_begin(BLI_Iterator *iter, void *data_in) { SceneLayer *scene_layer; Depsgraph *graph = (Depsgraph *) data_in; @@ -124,7 +124,7 @@ void DAG_objects_iterator_begin(Iterator *iter, void *data_in) DAG_objects_iterator_next(iter); } -void DAG_objects_iterator_next(Iterator *iter) +void DAG_objects_iterator_next(BLI_Iterator *iter) { DAGObjectsIteratorData *data = (DAGObjectsIteratorData *)iter->data; Base *base = data->base->next; @@ -163,7 +163,7 @@ void DAG_objects_iterator_next(Iterator *iter) iter->valid = false; } -void DAG_objects_iterator_end(Iterator *iter) +void DAG_objects_iterator_end(BLI_Iterator *iter) { DAGObjectsIteratorData *data = (DAGObjectsIteratorData *)iter->data; if (data) { diff --git a/source/blender/makesrna/intern/rna_depsgraph.c b/source/blender/makesrna/intern/rna_depsgraph.c index 571f07471a7..cc94bee2b3a 100644 --- a/source/blender/makesrna/intern/rna_depsgraph.c +++ b/source/blender/makesrna/intern/rna_depsgraph.c @@ -87,15 +87,15 @@ static void rna_Depsgraph_debug_stats(Depsgraph *graph, ReportList *reports) static void rna_Depsgraph_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { Depsgraph *graph = (Depsgraph *)ptr->data; - iter->internal.custom = MEM_callocN(sizeof(Iterator), __func__); + iter->internal.custom = MEM_callocN(sizeof(BLI_Iterator), __func__); DAG_objects_iterator_begin(iter->internal.custom, graph); - iter->valid = ((Iterator *)iter->internal.custom)->valid; + iter->valid = ((BLI_Iterator *)iter->internal.custom)->valid; } static void rna_Depsgraph_objects_next(CollectionPropertyIterator *iter) { DAG_objects_iterator_next(iter->internal.custom); - iter->valid = ((Iterator *)iter->internal.custom)->valid; + iter->valid = ((BLI_Iterator *)iter->internal.custom)->valid; } static void rna_Depsgraph_objects_end(CollectionPropertyIterator *iter) @@ -106,7 +106,7 @@ static void rna_Depsgraph_objects_end(CollectionPropertyIterator *iter) static PointerRNA rna_Depsgraph_objects_get(CollectionPropertyIterator *iter) { - Object *ob = ((Iterator *)iter->internal.custom)->current; + Object *ob = ((BLI_Iterator *)iter->internal.custom)->current; return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ob); } |