Cleanup: macro's w/ an _END need a matching _BEGIN
authorCampbell Barton <ideasman42@gmail.com>
Thu, 1 Mar 2018 08:00:54 +0000 (19:00 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 1 Mar 2018 08:01:53 +0000 (19:01 +1100)
Convention from 2.7x, since some looping macros don't need an '_END',
it avoids confusion to keep this.

27 files changed:
source/blender/blenkernel/BKE_collection.h
source/blender/blenkernel/BKE_layer.h
source/blender/blenkernel/intern/collection.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenkernel/intern/particle_system.c
source/blender/collada/EffectExporter.cpp
source/blender/depsgraph/DEG_depsgraph_query.h
source/blender/draw/intern/draw_manager.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/screen/screen_context.c
source/blender/editors/space_clip/tracking_ops_orient.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/makesrna/intern/rna_layer.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_scene.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/pipeline.c

index 3bf14346ccb45a310138205ba87efef63c80e190..af8047bf373e9abc21c2cbe56a73eb590ce12963 100644 (file)
@@ -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,                                \
index 17b854e5bf70ef310c4c50eff0de7cc721ad1e78..d9c9041f3308d0a308155e15ad6b5943d33b6a72 100644 (file)
@@ -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_),                                                    \
        };                                                                        \
index c92096efd07b8f3698b936863374433344894bf5..ffd5aea35ea9acff98f4e727892dcac8cb80d38c 100644 (file)
@@ -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;
        }
index 419ed8246db75ec35fa003cd73044fe8de45a079..e49c691448b81700a9abc84e32bee0336807b98a 100644 (file)
@@ -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);
index e689461636d199abaca328c392199774743efca3..46f5e427a4065c5856c3c9f48789cf7edd6e8fd9 100644 (file)
@@ -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);
index 2ee18df1331cec1d937de4c3b4905139c01d07e2..20a31ca6b5ea551fb89cf714180c5a3b603ef114 100644 (file)
@@ -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) {
index 5e7f92047d3bdee1d62a05adc54593d8f5f242ea..6095038605e0cb0391d4345f888ed219633700f0 100644 (file)
@@ -67,7 +67,7 @@ EffectsExporter::EffectsExporter(COLLADASW::StreamWriter *sw, const ExportSettin
 
 bool EffectsExporter::hasEffects(Scene *sce)
 {
-       FOREACH_SCENE_OBJECT(sce, ob)
+       FOREACH_SCENE_OBJECT_BEGIN(sce, ob)
        {
                int a;
                for (a = 0; a < ob->totcol; a++) {
index fffdccf3efcb3e7545b24157e6c7d2a586e8bb44..1571e9edf73787b3717ecbecde8e3549cffbc6f4 100644 (file)
@@ -124,7 +124,7 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter);
  * Although they are available they have no overrides (collection_properties)
  * and will crash if you try to access it.
  */
-#define DEG_OBJECT_ITER(graph_, instance_, mode_, flag_)                          \
+#define DEG_OBJECT_ITER_BEGIN(graph_, instance_, mode_, flag_)                    \
        {                                                                             \
                DEGObjectIterData data_ = {                                               \
                        .graph = (graph_),                                                    \
@@ -145,7 +145,7 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter);
   * Depsgraph objects iterator for draw manager and final render
   */
 #define DEG_OBJECT_ITER_FOR_RENDER_ENGINE(graph_, instance_, mode_) \
-       DEG_OBJECT_ITER(graph_, instance_, mode_,                \
+       DEG_OBJECT_ITER_BEGIN(graph_, instance_, mode_,                \
                DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY  |          \
                DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET |            \
                DEG_ITER_OBJECT_FLAG_VISIBLE |                   \
index 2d0b897a2488f9b6df6875e35b080a1124d77f9f..7b60f7a0646cc6475e014bd9e5c089d34aa39ca7 100644 (file)
@@ -1464,7 +1464,7 @@ void DRW_draw_select_loop(
                        drw_engines_cache_populate(obact);
                }
                else {
-                       DEG_OBJECT_ITER(depsgraph, ob, DRW_iterator_mode_get(),
+                       DEG_OBJECT_ITER_BEGIN(depsgraph, ob, DRW_iterator_mode_get(),
                                        DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
                                        DEG_ITER_OBJECT_FLAG_VISIBLE |
                                        DEG_ITER_OBJECT_FLAG_DUPLI)
index c91f92bc70bd98b4edbde8e82f45ad5eee63267f..f17a83dec8f0299f721d9ebe01942c9d6dee6da1 100644 (file)
@@ -158,7 +158,7 @@ void BIF_makeListTemplates(const bContext *C)
        TEMPLATES_HASH = BLI_ghash_int_new("makeListTemplates gh");
        TEMPLATES_CURRENT = 0;
 
-       FOREACH_OBJECT(view_layer, ob)
+       FOREACH_OBJECT_BEGIN(view_layer, ob)
        {
                if (ob != obedit && ob->type == OB_ARMATURE) {
                        index++;
index 94379ee118535dfece5fb90e262aeb1c71a69352..0b32ae5a0e4654dce8046a646c0a6278550165aa 100644 (file)
@@ -351,7 +351,7 @@ static void id_search_cb_objects_from_scene(const bContext *C, void *arg_templat
 
        BKE_main_id_flag_listbase(lb, LIB_TAG_DOIT, false);
 
-       FOREACH_SCENE_OBJECT(scene, ob_iter)
+       FOREACH_SCENE_OBJECT_BEGIN(scene, ob_iter)
        {
                ob_iter->id.tag |= LIB_TAG_DOIT;
        }
index c4bad6f76c9d00b43158503c36814b46d8069e5e..cec79c8e4e8aa36c835eccad03fa5d19d495a992 100644 (file)
@@ -1719,7 +1719,7 @@ static int convert_exec(bContext *C, wmOperator *op)
        /* don't forget multiple users! */
 
        {
-               FOREACH_SCENE_OBJECT(scene, ob)
+               FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
                {
                        ob->flag &= ~OB_DONE;
 
@@ -2009,7 +2009,7 @@ static int convert_exec(bContext *C, wmOperator *op)
 
        if (!keep_original) {
                if (mballConverted) {
-                       FOREACH_SCENE_OBJECT(scene, ob_mball)
+                       FOREACH_SCENE_OBJECT_BEGIN(scene, ob_mball)
                        {
                                if (ob_mball->type == OB_MBALL) {
                                        if (ob_mball->flag & OB_DONE) {
index f2111adc09a81b5cafbcf21b1f3bbeb169acdcfa..32753c91a042bcf0e1c01acc4006b8b3e47fafeb 100644 (file)
@@ -1747,7 +1747,7 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in
  * button can be functional.*/
 void ED_object_single_user(Main *bmain, Scene *scene, Object *ob)
 {
-       FOREACH_SCENE_OBJECT(scene, ob_iter)
+       FOREACH_SCENE_OBJECT_BEGIN(scene, ob_iter)
        {
                ob_iter->flag &= ~OB_DONE;
        }
@@ -1791,7 +1791,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
        ID *id;
        int a;
 
-       FOREACH_OBJECT_FLAG(scene, view_layer, flag, ob)
+       FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
        {
                if (!ID_IS_LINKED(ob)) {
                        id = ob->data;
@@ -1849,7 +1849,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
                                                printf("ERROR %s: can't copy %s\n", __func__, id->name);
                                                BLI_assert(!"This should never happen.");
 
-                                               /* We need to end the FOREACH_OBJECT_FLAG iterator to prevent memory leak. */
+                                               /* We need to end the FOREACH_OBJECT_FLAG_BEGIN iterator to prevent memory leak. */
                                                BKE_scene_objects_iterator_end(&iter_macro);
                                                return;
                                }
@@ -1876,7 +1876,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
 
 static void single_object_action_users(Scene *scene, ViewLayer *view_layer, const int flag)
 {
-       FOREACH_OBJECT_FLAG(scene, view_layer, flag, ob)
+       FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
                if (!ID_IS_LINKED(ob)) {
                        DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
                        BKE_animdata_copy_id_action(&ob->id, false);
@@ -1890,7 +1890,7 @@ static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, c
        Tex *tex;
        int a, b;
 
-       FOREACH_OBJECT_FLAG(scene, view_layer, flag, ob)
+       FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, ob)
                if (!ID_IS_LINKED(ob)) {
                        for (a = 1; a <= ob->totcol; a++) {
                                ma = give_current_material(ob, a);
@@ -2045,7 +2045,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo
        {
                IDP_RelinkProperty(scene->id.properties);
 
-               FOREACH_SCENE_OBJECT(scene, ob)
+               FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
                {
                        if (!ID_IS_LINKED(ob)) {
                                IDP_RelinkProperty(ob->id.properties);
index c857a7be4a3e9c0f409488a7eed8564f2cc584a6..5cf04ddc7355576a0301f2c6e27a7393476f8355 100644 (file)
@@ -159,7 +159,7 @@ void ED_object_base_activate(bContext *C, Base *base)
                if (workspace->object_mode & OB_MODE_ALL_MODE_DATA) {
                        EvaluationContext eval_ctx;
                        CTX_data_eval_ctx(C, &eval_ctx);
-                       FOREACH_OBJECT(view_layer, ob) {
+                       FOREACH_OBJECT_BEGIN(view_layer, ob) {
                                if (ob != obact) {
                                        ED_object_mode_generic_exit(&eval_ctx, workspace, scene, ob);
                                }
index 8c6ccb7e8f0f5e926dacbafbd84ef62eca944b23..613af8e525983d80179d8634f5ab642fa4f9d470 100644 (file)
@@ -3360,7 +3360,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op))
        Object *ob_active = ED_object_context(C);
        int retval = OPERATOR_CANCELLED;
 
-       FOREACH_SCENE_OBJECT(scene, ob_iter)
+       FOREACH_SCENE_OBJECT_BEGIN(scene, ob_iter)
        {
                if (ob_iter->type == ob_active->type) {
                        if (ob_iter != ob_active && ob_iter->data == ob_active->data) {
index a859f664dc8ef7a902cdcd705a001643132bc513..3062ccb83bf11dff3824a7512ac3b21ca5355f0d 100644 (file)
@@ -260,7 +260,7 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op))
        PTCacheID *pid;
        ListBase pidlist;
 
-       FOREACH_SCENE_OBJECT(scene, ob)
+       FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
        {
                BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
 
index dc4dcdb45549bb28075f33753b97ce41444d04e4..5f8520a92f8c5bc240d17eee5c8a0bae38a4ca77 100644 (file)
@@ -103,7 +103,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                return 1;
        }
        else if (CTX_data_equals(member, "visible_objects")) {
-               FOREACH_VISIBLE_OBJECT(view_layer, ob)
+               FOREACH_VISIBLE_OBJECT_BEGIN(view_layer, ob)
                {
                        CTX_data_id_list_add(result, &ob->id);
                }
@@ -121,7 +121,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                return 1;
        }
        else if (CTX_data_equals(member, "selected_objects")) {
-               FOREACH_SELECTED_OBJECT(view_layer, ob)
+               FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob)
                {
                        CTX_data_id_list_add(result, &ob->id);
                }
@@ -130,7 +130,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                return 1;
        }
        else if (CTX_data_equals(member, "selected_editable_objects")) {
-               FOREACH_SELECTED_OBJECT(view_layer, ob)
+               FOREACH_SELECTED_OBJECT_BEGIN(view_layer, ob)
                {
                        if (0 == BKE_object_is_libdata(ob)) {
                                CTX_data_id_list_add(result, &ob->id);
@@ -142,7 +142,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
        }
        else if (CTX_data_equals(member, "editable_objects")) {
                /* Visible + Editable, but not necessarily selected */
-               FOREACH_VISIBLE_OBJECT(view_layer, ob)
+               FOREACH_VISIBLE_OBJECT_BEGIN(view_layer, ob)
                {
                        if (0 == BKE_object_is_libdata(ob)) {
                                CTX_data_id_list_add(result, &ob->id);
@@ -153,7 +153,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
                return 1;
        }
        else if ( CTX_data_equals(member, "visible_bases")) {
-               FOREACH_VISIBLE_BASE(view_layer, base)
+               FOREACH_VISIBLE_BASE_BEGIN(view_layer, base)
                {
                        CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
                }
index 8e3871836e4b7ecdeb6c8e00e8977726a50b5a26..e109a54c5e137821c8e513f27824e256e4183d4a 100644 (file)
@@ -71,7 +71,7 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
                return camera;
        }
 
-       FOREACH_SCENE_OBJECT(scene, ob)
+       FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
        {
                if (ob->type == OB_CAMERA) {
                        if (BKE_object_movieclip_get(scene, ob, false) == clip) {
index 00eb4efde02a528c4582f0bb1314900b69c3bbd8..7d3fa1473556cfb1cdc7639954488f7deab6e99f 100644 (file)
@@ -2380,7 +2380,7 @@ void outliner_build_tree(
        }
        else if (soops->outlinevis == SO_COLLECTIONS) {
                if ((soops->filter & SO_FILTER_ENABLE) && (soops->filter & SO_FILTER_NO_COLLECTION)) {
-                       FOREACH_SCENE_OBJECT(scene, ob)
+                       FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
                        {
                                outliner_add_element(soops, eval_ctx, &soops->tree, ob, NULL, 0, 0);
                        }
index 2e6ffb63b78d4a9ed552760785361a199cdcfeaa..d1644a11adc3a6abf6a747d050b9cbac3f66023b 100644 (file)
@@ -2045,7 +2045,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b
                qsort(vbuffer, hits, sizeof(uint[4]), opengl_select_buffer_cmp);
 
                /*
-                * Even though 'DRW_draw_select_loop' uses 'DEG_OBJECT_ITER',
+                * Even though 'DRW_draw_select_loop' uses 'DEG_OBJECT_ITER_BEGIN',
                 * we can be sure the order remains the same between both.
                 */
                for (base = vc->view_layer->object_bases.first; base && hits; base = base->next) {
index 77c780f496c3b40694e3ec2205c43082fbd8e039..312a4355af74c05ecc02bb1a67e272b0a8424f33 100644 (file)
@@ -217,7 +217,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer()
        }
 
        // Make sure we don't have any bases which might reference freed objects.
-       FOREACH_SCENE_COLLECTION(freestyle_scene, sc)
+       FOREACH_SCENE_COLLECTION_BEGIN(freestyle_scene, sc)
        {
                BLI_freelistN(&sc->objects);
        }
index 7a1c1710a8727db850b2fd5e0bc6e460d54e8df6..952ec59473a7973ef25d1e46e5f234c9b98af87e 100644 (file)
@@ -911,7 +911,7 @@ static void rna_LayerObjects_selected_begin(CollectionPropertyIterator *iter, Po
 static void rna_ViewLayer_update_tagged(ViewLayer *UNUSED(view_layer), bContext *C)
 {
        Depsgraph *graph = CTX_data_depsgraph(C);
-       DEG_OBJECT_ITER(graph, ob, DEG_ITER_OBJECT_MODE_VIEWPORT,
+       DEG_OBJECT_ITER_BEGIN(graph, ob, DEG_ITER_OBJECT_MODE_VIEWPORT,
                        DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY |
                        DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET |
                        DEG_ITER_OBJECT_FLAG_LINKED_INDIRECTLY |
index 8fc6b2b1a58d6ca723b12bc157db6b6f586e771f..1f2b1c1eab3509cff846fa940c4419bb07e7460b 100644 (file)
@@ -609,7 +609,7 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
 
        if (id && GS(id->name) == ID_SCE) {
                Scene *scene = (Scene *)id;
-               FOREACH_SCENE_OBJECT(scene, ob)
+               FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
                {
                        BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
                }
index 2c3f90d718bf3aaf175784158f40e1750feb20ef..33c4db9de5c5838c0224c1a7df9612cbe13ebb87 100644 (file)
@@ -1469,7 +1469,7 @@ static void rna_Scene_use_nodes_update(bContext *C, PointerRNA *ptr)
 static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
        Scene *scene = (Scene *)ptr->id.data;
-       FOREACH_SCENE_OBJECT(scene, ob)
+       FOREACH_SCENE_OBJECT_BEGIN(scene, ob)
        {
                BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
        }
@@ -1545,7 +1545,7 @@ static void rna_Scene_use_simplify_update(Main *UNUSED(bmain), Scene *UNUSED(sce
        Scene *sce_iter;
        Base *base;
 
-       FOREACH_SCENE_OBJECT(sce, ob)
+       FOREACH_SCENE_OBJECT_BEGIN(sce, ob)
        {
                object_simplify_update(ob);
        }
index 27ff1445176949485f1237a9e87d7c08798e3865..b6a57eea899763541e60d5961bfab6a300e5e7a0 100644 (file)
@@ -108,7 +108,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
        FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
        if (fluidmd && fluidmd->fss) {
                if (fluidmd->fss->type == OB_FLUIDSIM_DOMAIN) {
-                       FOREACH_SCENE_OBJECT(ctx->scene, ob1)
+                       FOREACH_SCENE_OBJECT_BEGIN(ctx->scene, ob1)
                        {
                                if (ob1 != ctx->object) {
                                        FluidsimModifierData *fluidmdtmp =
index f666bbd2b9552674b80db613b366b10b479a7576..58b18e4699179561bb467d4a194ddbf41d550abd 100644 (file)
@@ -250,7 +250,7 @@ static void env_set_imats(Render *re)
 {
        float mat[4][4];
 
-       FOREACH_SCENE_OBJECT(re->scene, ob)
+       FOREACH_SCENE_OBJECT_BEGIN(re->scene, ob)
        {
                mul_m4_m4m4(mat, re->viewmat, ob->obmat);
                invert_m4_m4(ob->imat, mat);
index b2a03cc884f7933eae5cc6f0f74725ec0bb80685..57431716b29fa2220766919d849e7a0042348de2 100644 (file)
@@ -1981,7 +1981,7 @@ bool RE_allow_render_generic_object(Object *ob)
 #ifdef DEPSGRAPH_WORKAROUND_HACK
 static void tag_dependend_objects_for_render(Scene *scene, int UNUSED(renderlay))
 {
-       FOREACH_OBJECT_RENDERABLE(scene, object)
+       FOREACH_OBJECT_RENDERABLE_BEGIN(scene, object)
        {
                if (object->type == OB_MESH) {
                        if (RE_allow_render_generic_object(object)) {