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/makesrna
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/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_layer.c15
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c4
3 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c
index 952ec59473a..9992ab06211 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -911,18 +911,19 @@ 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_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 |
- DEG_ITER_OBJECT_FLAG_VISIBLE |
- DEG_ITER_OBJECT_FLAG_DUPLI)
+ 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 |
+ DEG_ITER_OBJECT_FLAG_VISIBLE |
+ DEG_ITER_OBJECT_FLAG_DUPLI)
{
/* Don't do anything, we just need to run the iterator to flush
* the base info to the objects. */
UNUSED_VARS(ob);
}
- DEG_OBJECT_ITER_END
+ DEG_OBJECT_ITER_END;
}
static void rna_ObjectBase_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 1f2b1c1eab3..4a89ca001ac 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -613,7 +613,7 @@ static void rna_EffectorWeight_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
{
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
}
- FOREACH_SCENE_OBJECT_END
+ FOREACH_SCENE_OBJECT_END;
}
else {
DEG_id_tag_update(id, OB_RECALC_DATA | PSYS_RECALC_RESET);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 33c4db9de5c..955cc5cc884 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1473,7 +1473,7 @@ static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
{
BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
}
- FOREACH_SCENE_OBJECT_END
+ FOREACH_SCENE_OBJECT_END;
}
static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)
@@ -1549,7 +1549,7 @@ static void rna_Scene_use_simplify_update(Main *UNUSED(bmain), Scene *UNUSED(sce
{
object_simplify_update(ob);
}
- FOREACH_SCENE_OBJECT_END
+ FOREACH_SCENE_OBJECT_END;
for (SETLOOPER_SET_ONLY(sce, sce_iter, base)) {
object_simplify_update(base->object);