Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-09 03:44:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-09 03:52:11 +0300
commitf47a41a3d9f9850f852abb3d76bea2c8b281bb45 (patch)
treeb50d618fa0300e4ae96a5cf7d3029013515c5e93 /source/blender/editors/object/object_relations.c
parent9342f55d12f87dbc72e6953e0bc6c2564e57465f (diff)
Cleanup: iterator macros
- put render iterator in own scope (would shadow it's own variable if used multiple times). - enforce semicolon at end of iterator macros. - no need to typedef one-off macro structs.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 3575601973d..3c54c6d0d5a 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -406,7 +406,7 @@ static const EnumPropertyItem *proxy_group_object_itemf(bContext *C, PointerRNA
item_tmp.value = i++;
RNA_enum_item_add(&item, &totitem, &item_tmp);
}
- FOREACH_GROUP_OBJECT_END
+ FOREACH_GROUP_OBJECT_END;
RNA_enum_item_end(&item, &totitem);
*r_free = true;
@@ -1717,7 +1717,7 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in
break;
}
}
- FOREACH_GROUP_OBJECT_END
+ FOREACH_GROUP_OBJECT_END;
if (all_duplicated) {
groupn = ID_NEW_SET(group, BKE_group_copy(bmain, group));
@@ -1751,7 +1751,7 @@ void ED_object_single_user(Main *bmain, Scene *scene, Object *ob)
{
ob_iter->flag &= ~OB_DONE;
}
- FOREACH_SCENE_OBJECT_END
+ FOREACH_SCENE_OBJECT_END;
/* tag only the one object */
ob->flag |= OB_DONE;
@@ -1865,7 +1865,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, ViewLayer *view_layer
}
}
}
- FOREACH_OBJECT_FLAG_END
+ FOREACH_OBJECT_FLAG_END;
me = bmain->mesh.first;
while (me) {
@@ -1877,11 +1877,13 @@ 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_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);
}
- FOREACH_OBJECT_FLAG_END
+ }
+ FOREACH_OBJECT_FLAG_END;
}
static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, const int flag, const bool do_textures)
@@ -1891,6 +1893,7 @@ static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, c
int a, b;
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);
@@ -1920,7 +1923,8 @@ static void single_mat_users(Main *bmain, Scene *scene, ViewLayer *view_layer, c
}
}
}
- FOREACH_OBJECT_FLAG_END
+ }
+ FOREACH_OBJECT_FLAG_END;
}
static void do_single_tex_user(Main *bmain, Tex **from)
@@ -2051,7 +2055,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo
IDP_RelinkProperty(ob->id.properties);
}
}
- FOREACH_SCENE_OBJECT_END
+ FOREACH_SCENE_OBJECT_END;
if (scene->nodetree) {
IDP_RelinkProperty(scene->nodetree->id.properties);