diff options
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_collection.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_layer.h | 14 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library_query.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library_remap.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h index 3bf14346ccb..af8047bf373 100644 --- a/source/blender/blenkernel/BKE_collection.h +++ b/source/blender/blenkernel/BKE_collection.h @@ -83,7 +83,7 @@ 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(_id, _instance) \ +#define FOREACH_SCENE_COLLECTION_BEGIN(_id, _instance) \ ITER_BEGIN(BKE_scene_collections_iterator_begin, \ BKE_scene_collections_iterator_next, \ BKE_scene_collections_iterator_end, \ @@ -92,7 +92,7 @@ void BKE_scene_objects_iterator_end(struct BLI_Iterator *iter); #define FOREACH_SCENE_COLLECTION_END \ ITER_END -#define FOREACH_SCENE_OBJECT(scene, _instance) \ +#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance) \ ITER_BEGIN(BKE_scene_objects_iterator_begin, \ BKE_scene_objects_iterator_next, \ BKE_scene_objects_iterator_end, \ diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index 17b854e5bf7..d9c9041f330 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -199,7 +199,7 @@ 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(view_layer, _instance) \ +#define FOREACH_SELECTED_OBJECT_BEGIN(view_layer, _instance) \ ITER_BEGIN(BKE_selected_objects_iterator_begin, \ BKE_selected_objects_iterator_next, \ BKE_selected_objects_iterator_end, \ @@ -208,7 +208,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); #define FOREACH_SELECTED_OBJECT_END \ ITER_END -#define FOREACH_VISIBLE_OBJECT(view_layer, _instance) \ +#define FOREACH_VISIBLE_OBJECT_BEGIN(view_layer, _instance) \ ITER_BEGIN(BKE_visible_objects_iterator_begin, \ BKE_visible_objects_iterator_next, \ BKE_visible_objects_iterator_end, \ @@ -217,7 +217,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); #define FOREACH_VISIBLE_OBJECT_END \ ITER_END -#define FOREACH_SELECTED_BASE(view_layer, _instance) \ +#define FOREACH_SELECTED_BASE_BEGIN(view_layer, _instance) \ ITER_BEGIN(BKE_selected_bases_iterator_begin, \ BKE_selected_bases_iterator_next, \ BKE_selected_bases_iterator_end, \ @@ -226,7 +226,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); #define FOREACH_SELECTED_BASE_END \ ITER_END -#define FOREACH_VISIBLE_BASE(view_layer, _instance) \ +#define FOREACH_VISIBLE_BASE_BEGIN(view_layer, _instance) \ ITER_BEGIN(BKE_visible_bases_iterator_begin, \ BKE_visible_bases_iterator_next, \ BKE_visible_bases_iterator_end, \ @@ -236,7 +236,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); ITER_END -#define FOREACH_OBJECT(view_layer, _instance) \ +#define FOREACH_OBJECT_BEGIN(view_layer, _instance) \ { \ Object *_instance; \ Base *_base; \ @@ -247,7 +247,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); } \ } -#define FOREACH_OBJECT_FLAG(scene, view_layer, flag, _instance) \ +#define FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, _instance) \ { \ IteratorBeginCb func_begin; \ IteratorCb func_next, func_end; \ @@ -284,7 +284,7 @@ typedef struct ObjectsRenderableIteratorData { } iter; } ObjectsRenderableIteratorData; -#define FOREACH_OBJECT_RENDERABLE(scene_, _instance) \ +#define FOREACH_OBJECT_RENDERABLE_BEGIN(scene_, _instance) \ ObjectsRenderableIteratorData data_ = { \ .scene = (scene_), \ }; \ diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index c92096efd07..ffd5aea35ea 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -218,7 +218,7 @@ bool BKE_collection_remove(ID *owner_id, SceneCollection *sc) ListBase collection_objects; BLI_duplicatelist(&collection_objects, &sc->objects); - FOREACH_SCENE_COLLECTION(owner_id, scene_collection_iter) + FOREACH_SCENE_COLLECTION_BEGIN(owner_id, scene_collection_iter) { if (scene_collection_iter == sc) { continue; @@ -405,7 +405,7 @@ bool BKE_collection_object_add(const ID *owner_id, SceneCollection *sc, Object * */ void BKE_collection_object_add_from(Scene *scene, Object *ob_src, Object *ob_dst) { - FOREACH_SCENE_COLLECTION(scene, sc) + FOREACH_SCENE_COLLECTION_BEGIN(scene, sc) { if (BLI_findptr(&sc->objects, ob_src, offsetof(LinkData, data))) { collection_object_add(&scene->id, sc, ob_dst); @@ -480,7 +480,7 @@ bool BKE_collections_object_remove(Main *bmain, ID *owner_id, Object *ob, const BLI_assert(GS(owner_id->name) == ID_GR); } - FOREACH_SCENE_COLLECTION(owner_id, sc) + FOREACH_SCENE_COLLECTION_BEGIN(owner_id, sc) { removed |= BKE_collection_object_remove(bmain, owner_id, sc, ob, free_us); } @@ -552,7 +552,7 @@ Group *BKE_collection_group_create(Main *bmain, Scene *scene, LayerCollection *l sc_dst = BKE_collection_add(&group->id, NULL, COLLECTION_TYPE_GROUP_INTERNAL, sc_src->name); BKE_collection_copy_data(sc_dst, sc_src, 0); - FOREACH_SCENE_COLLECTION(&group->id, sc_group) + FOREACH_SCENE_COLLECTION_BEGIN(&group->id, sc_group) { sc_group->type = COLLECTION_TYPE_GROUP_INTERNAL; } diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 419ed8246db..e49c691448b 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -440,7 +440,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call CALLBACK_INVOKE(scene->gpd, IDWALK_CB_USER); - FOREACH_SCENE_COLLECTION(scene, sc) + FOREACH_SCENE_COLLECTION_BEGIN(scene, sc) { for (LinkData *link = sc->objects.first; link; link = link->next) { CALLBACK_INVOKE_ID(link->data, IDWALK_CB_USER); diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index e689461636d..46f5e427a40 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -313,7 +313,7 @@ static void libblock_remap_data_preprocess(IDRemap *r_id_remap_data) /* In case we are unlinking... */ if (!r_id_remap_data->old_id) { /* ... everything from scene. */ - FOREACH_SCENE_OBJECT(sce, ob_iter) + FOREACH_SCENE_OBJECT_BEGIN(sce, ob_iter) { libblock_remap_data_preprocess_scene_object_unlink( r_id_remap_data, sce, ob_iter, skip_indirect, is_indirect); @@ -391,7 +391,7 @@ static void libblock_remap_data_postprocess_group_scene_unlink(Main *UNUSED(bmai { /* Note that here we assume no object has no base (i.e. all objects are assumed instanced * in one scene...). */ - FOREACH_SCENE_OBJECT(sce, ob) + FOREACH_SCENE_OBJECT_BEGIN(sce, ob) { if (ob->flag & OB_FROMGROUP) { Group *grp = BKE_group_object_find(NULL, ob); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 2ee18df1331..20a31ca6b5e 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2956,7 +2956,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons /* particle instance modifier with "path" option need cached paths even if particle system doesn't */ - FOREACH_SCENE_OBJECT(sim->scene, ob) + FOREACH_SCENE_OBJECT_BEGIN(sim->scene, ob) { ModifierData *md = modifiers_findByType(ob, eModifierType_ParticleInstance); if (md) { |