diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-01 11:00:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-01 11:01:53 +0300 |
commit | 7aed2de798b1e5f8663e8fe608a99f6c9f53c382 (patch) | |
tree | 1f811fd3d80e3cce969db7e317b5629e54cbe5ce /source/blender/editors | |
parent | 1fc5eb305a2bd61ed465db376cec73a3822c0bf6 (diff) |
Cleanup: macro's w/ an _END need a matching _BEGIN
Convention from 2.7x, since some looping macros don't need an '_END',
it avoids confusion to keep this.
Diffstat (limited to 'source/blender/editors')
11 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index c91f92bc70b..f17a83dec8f 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -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++; diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 94379ee1185..0b32ae5a0e4 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -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; } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index c4bad6f76c9..cec79c8e4e8 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -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) { diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f2111adc09a..32753c91a04 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -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); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index c857a7be4a3..5cf04ddc735 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -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); } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 8c6ccb7e8f0..613af8e5259 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -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) { diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index a859f664dc8..3062ccb83bf 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -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); diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index dc4dcdb4554..5f8520a92f8 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -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); } diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index 8e3871836e4..e109a54c5e1 100644 --- a/source/blender/editors/space_clip/tracking_ops_orient.c +++ b/source/blender/editors/space_clip/tracking_ops_orient.c @@ -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) { diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 00eb4efde02..7d3fa147355 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -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); } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 2e6ffb63b78..d1644a11adc 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -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) { |