diff options
Diffstat (limited to 'source')
43 files changed, 102 insertions, 94 deletions
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index 6f7ced403a2..a842bec7609 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -80,6 +80,6 @@ void BKE_group_eval_view_layers(const struct EvaluationContext *eval_ctx, BLI_assert(_object != NULL); #define FOREACH_GROUP_OBJECT_END \ - } + } ((void)0) #endif /* __BKE_GROUP_H__ */ diff --git a/source/blender/blenkernel/BKE_layer.h b/source/blender/blenkernel/BKE_layer.h index d9c9041f330..59aec53aa1e 100644 --- a/source/blender/blenkernel/BKE_layer.h +++ b/source/blender/blenkernel/BKE_layer.h @@ -245,7 +245,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); #define FOREACH_OBJECT_END \ } \ -} +} ((void)0) #define FOREACH_OBJECT_FLAG_BEGIN(scene, view_layer, flag, _instance) \ { \ @@ -269,10 +269,10 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *iter); #define FOREACH_OBJECT_FLAG_END \ - ITER_END \ -} + ITER_END; \ +} ((void)0) -typedef struct ObjectsRenderableIteratorData { +struct ObjectsRenderableIteratorData { struct Scene *scene; struct Base base_temp; struct Scene scene_temp; @@ -282,10 +282,11 @@ typedef struct ObjectsRenderableIteratorData { struct Base *base; struct Scene *set; } iter; -} ObjectsRenderableIteratorData; +}; #define FOREACH_OBJECT_RENDERABLE_BEGIN(scene_, _instance) \ - ObjectsRenderableIteratorData data_ = { \ +{ \ + struct ObjectsRenderableIteratorData data_ = { \ .scene = (scene_), \ }; \ ITER_BEGIN(BKE_renderable_objects_iterator_begin, \ @@ -295,7 +296,8 @@ typedef struct ObjectsRenderableIteratorData { #define FOREACH_OBJECT_RENDERABLE_END \ - ITER_END + ITER_END; \ +} ((void)0) #ifdef __cplusplus } diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index ffd5aea35ea..fb27249402b 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -236,7 +236,7 @@ bool BKE_collection_remove(ID *owner_id, SceneCollection *sc) link = link_next; } } - FOREACH_SCENE_COLLECTION_END + FOREACH_SCENE_COLLECTION_END; for (LinkData *link = collection_objects.first; link; link = link->next) { BKE_collection_object_add(owner_id, sc_master, link->data); @@ -411,7 +411,7 @@ void BKE_collection_object_add_from(Scene *scene, Object *ob_src, Object *ob_dst collection_object_add(&scene->id, sc, ob_dst); } } - FOREACH_SCENE_COLLECTION_END + FOREACH_SCENE_COLLECTION_END; for (ViewLayer *view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) { Base *base_src = BKE_view_layer_base_find(view_layer, ob_src); @@ -484,7 +484,7 @@ bool BKE_collections_object_remove(Main *bmain, ID *owner_id, Object *ob, const { removed |= BKE_collection_object_remove(bmain, owner_id, sc, ob, free_us); } - FOREACH_SCENE_COLLECTION_END + FOREACH_SCENE_COLLECTION_END; return removed; } @@ -556,7 +556,7 @@ Group *BKE_collection_group_create(Main *bmain, Scene *scene, LayerCollection *l { sc_group->type = COLLECTION_TYPE_GROUP_INTERNAL; } - FOREACH_SCENE_COLLECTION_END + FOREACH_SCENE_COLLECTION_END; lc_dst = BKE_collection_link(group->view_layer, sc_dst); layer_collection_sync(lc_dst, lc_src); diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 55ded96fe01..c1872c92418 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -510,7 +510,7 @@ static void add_collision_object(Object ***objs, unsigned int *numobj, unsigned { add_collision_object(objs, numobj, maxobj, object, self, level+1, modifier_type); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } @@ -531,7 +531,7 @@ Object **get_collisionobjects_ext(Scene *scene, Object *self, Group *group, unsi { add_collision_object(&objs, &numobj, &maxobj, object, self, level, modifier_type); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } else { Scene *sce_iter; @@ -588,7 +588,7 @@ static void add_collider_cache_object(ListBase **objs, Object *ob, Object *self, { add_collider_cache_object(objs, object, self, level+1); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } @@ -602,7 +602,7 @@ ListBase *get_collider_cache(Scene *scene, Object *self, Group *group) { add_collider_cache_object(&objs, object, self, 0); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } else { Scene *sce_iter; diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index c5cea750b53..c3fe586bbbb 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -219,7 +219,7 @@ static bool group_object_cyclic_check_internal(Object *object, Group *group) return true; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } /* un-flag the object, it's allowed to have the same group multiple times in parallel */ @@ -284,7 +284,7 @@ bool BKE_group_is_animated(Group *group, Object *UNUSED(parent)) return true; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; return false; } @@ -375,7 +375,7 @@ void BKE_group_handle_recalc_and_update(const struct EvaluationContext *eval_ctx BKE_object_handle_update(eval_ctx, scene, object); } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index 82ac666c46b..cde256a0f14 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -2137,7 +2137,7 @@ void BKE_visible_bases_iterator_end(BLI_Iterator *UNUSED(iter)) void BKE_renderable_objects_iterator_begin(BLI_Iterator *iter, void *data_in) { - ObjectsRenderableIteratorData *data = data_in; + struct ObjectsRenderableIteratorData *data = data_in; /* Tag objects to prevent going over the same object twice. */ for (Scene *scene = data->scene; scene; scene = scene->set) { @@ -2165,7 +2165,7 @@ void BKE_renderable_objects_iterator_next(BLI_Iterator *iter) /* Set it early in case we need to exit and we are running from within a loop. */ iter->skip = true; - ObjectsRenderableIteratorData *data = iter->data; + struct ObjectsRenderableIteratorData *data = iter->data; Base *base = data->iter.base->next; /* There is still a base in the current scene layer. */ diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 2a5c8f955ab..27a2916ef92 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -446,7 +446,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call CALLBACK_INVOKE_ID(link->data, IDWALK_CB_USER); } } - FOREACH_SCENE_COLLECTION_END + FOREACH_SCENE_COLLECTION_END; ViewLayer *view_layer; for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) { diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index 46f5e427a40..483500cf67d 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -320,7 +320,7 @@ static void libblock_remap_data_preprocess(IDRemap *r_id_remap_data) libblock_remap_data_preprocess_group_unlink( r_id_remap_data, ob_iter, skip_indirect, is_indirect); } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; } else if (GS(r_id_remap_data->old_id->name) == ID_OB) { /* ... a specific object from scene. */ @@ -405,7 +405,7 @@ static void libblock_remap_data_postprocess_group_scene_unlink(Main *UNUSED(bmai } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; } static void libblock_remap_data_postprocess_obdata_relink(Main *UNUSED(bmain), Object *ob, ID *new_id) diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c index 391be751ae0..7419efba065 100644 --- a/source/blender/blenkernel/intern/object_dupli.c +++ b/source/blender/blenkernel/intern/object_dupli.c @@ -937,7 +937,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem (void) object; totgroup++; } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } /* we also copy the actual objects to restore afterwards, since @@ -967,7 +967,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem continue; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } else { @@ -1082,7 +1082,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem b++; } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } else { /* to give ipos in object correct offset */ diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index e90fa299f44..94f37c3e02c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -365,7 +365,7 @@ void psys_check_group_weights(ParticleSettings *part) BLI_addtail(&part->dupliweights, dw); } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; dw = part->dupliweights.first; for (; dw; dw = dw->next) { diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 20a31ca6b5e..4cf8533d843 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2967,7 +2967,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra, cons } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; if (!skip) { psys_cache_paths(sim, cfra, use_render_params); diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index d61cb0c9369..12a53f5f3e5 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -101,7 +101,7 @@ void BKE_rigidbody_free_world(RigidBodyWorld *rbw) } } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } if (rbw->group) { @@ -114,7 +114,7 @@ void BKE_rigidbody_free_world(RigidBodyWorld *rbw) } } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } /* free dynamics world */ RB_dworld_delete(rbw->physics_world); @@ -1157,7 +1157,7 @@ void BKE_rigidbody_remove_object(Scene *scene, Object *ob) } } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } @@ -1206,7 +1206,7 @@ static void rigidbody_update_ob_array(RigidBodyWorld *rbw) rbw->objects[i] = object; i++; } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } static void rigidbody_update_sim_world(Scene *scene, RigidBodyWorld *rbw) @@ -1341,7 +1341,7 @@ static void rigidbody_update_simulation(const struct EvaluationContext *eval_ctx rbc->physics_constraint = NULL; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } /* update objects */ @@ -1388,7 +1388,7 @@ static void rigidbody_update_simulation(const struct EvaluationContext *eval_ctx rigidbody_update_sim_ob(eval_ctx, scene, rbw, ob, rbo); } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; /* update constraints */ if (rbw->constraints == NULL) /* no constraints, move on */ @@ -1422,7 +1422,7 @@ static void rigidbody_update_simulation(const struct EvaluationContext *eval_ctx rbc->flag &= ~RBC_FLAG_NEEDS_VALIDATE; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } static void rigidbody_update_simulation_post_step(RigidBodyWorld *rbw) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 9a570ad0e46..ca9cddde65a 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -965,7 +965,7 @@ void BKE_scene_set_background(Main *bmain, Scene *scene) { object->flag |= OB_FROMGROUP; } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } /* copy layers and flags from bases to objects */ diff --git a/source/blender/blenlib/BLI_iterator.h b/source/blender/blenlib/BLI_iterator.h index 49a3cea58bc..d3d375122a1 100644 --- a/source/blender/blenlib/BLI_iterator.h +++ b/source/blender/blenlib/BLI_iterator.h @@ -57,6 +57,6 @@ typedef void (*IteratorBeginCb)(BLI_Iterator *iter, void *data_in); #define ITER_END \ } \ callback_end_func(&iter_macro); \ -} +} ((void)0) #endif /* __BLI_ITERATOR_H__ */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 50fd2a075f0..40c54e04ec7 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1352,7 +1352,7 @@ static void write_particlesettings(WriteData *wd, ParticleSettings *part) dw->index++; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } writestruct(wd, DATA, ParticleDupliWeight, 1, dw); diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp index d1d0152e69a..f24c104892d 100644 --- a/source/blender/collada/SceneExporter.cpp +++ b/source/blender/collada/SceneExporter.cpp @@ -179,7 +179,7 @@ void SceneExporter::writeNodes(const EvaluationContext *eval_ctx, Object *ob, Sc { printf("\t%s\n", object->id.name); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } diff --git a/source/blender/depsgraph/DEG_depsgraph_query.h b/source/blender/depsgraph/DEG_depsgraph_query.h index ab295b7cbb2..3a8d6e70aca 100644 --- a/source/blender/depsgraph/DEG_depsgraph_query.h +++ b/source/blender/depsgraph/DEG_depsgraph_query.h @@ -138,7 +138,7 @@ void DEG_iterator_objects_end(struct BLI_Iterator *iter); &data_, Object *, instance_) #define DEG_OBJECT_ITER_END \ - ITER_END \ + ITER_END; \ } /** diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 53dfa429abf..8ca5ee8f577 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1112,7 +1112,7 @@ void DRW_draw_render_loop_ex( { drw_engines_cache_populate(ob); } - DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END + DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END; drw_engines_cache_finish(); @@ -1485,17 +1485,18 @@ void DRW_draw_select_loop( drw_engines_cache_populate(obact); } else { - 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) + 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) { if ((ob->base_flag & BASE_SELECTABLED) != 0) { DRW_select_load_id(ob->select_color); drw_engines_cache_populate(ob); } } - DEG_OBJECT_ITER_END + DEG_OBJECT_ITER_END; } drw_engines_cache_finish(); @@ -1661,7 +1662,7 @@ void DRW_draw_depth_loop( { drw_engines_cache_populate(ob); } - DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END + DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END; drw_engines_cache_finish(); diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index f01eed21996..dcf4c9a0e9c 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -169,7 +169,7 @@ void BIF_makeListTemplates(const bContext *C) } } } - FOREACH_OBJECT_END + FOREACH_OBJECT_END; } #if 0 /* UNUSED */ diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 0b32ae5a0e4..75b657e1e29 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -355,7 +355,7 @@ static void id_search_cb_objects_from_scene(const bContext *C, void *arg_templat { ob_iter->id.tag |= LIB_TAG_DOIT; } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; id_search_cb_tagged(C, arg_template, str, items); } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index eba1b2e4fde..3590b38310f 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1739,7 +1739,7 @@ static int convert_exec(bContext *C, wmOperator *op) } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; } ListBase selected_editable_bases = CTX_data_collection_get(C, "selected_editable_bases"); @@ -2022,7 +2022,7 @@ static int convert_exec(bContext *C, wmOperator *op) } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; } /* delete object should renew depsgraph */ 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); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 613af8e5259..00a24e7fe72 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -3376,7 +3376,7 @@ static int vertex_group_copy_to_linked_exec(bContext *C, wmOperator *UNUSED(op)) } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; return retval; } diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 3062ccb83bf..b1d870a43ae 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -272,7 +272,7 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *UNUSED(op)) WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob); } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c index 5f8520a92f8..4c217a5e829 100644 --- a/source/blender/editors/screen/screen_context.c +++ b/source/blender/editors/screen/screen_context.c @@ -107,7 +107,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult { CTX_data_id_list_add(result, &ob->id); } - FOREACH_VISIBLE_BASE_END + FOREACH_VISIBLE_BASE_END; CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } @@ -125,7 +125,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult { CTX_data_id_list_add(result, &ob->id); } - FOREACH_SELECTED_OBJECT_END + FOREACH_SELECTED_OBJECT_END; CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } @@ -136,7 +136,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult CTX_data_id_list_add(result, &ob->id); } } - FOREACH_SELECTED_OBJECT_END + FOREACH_SELECTED_OBJECT_END; CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } @@ -148,7 +148,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult CTX_data_id_list_add(result, &ob->id); } } - FOREACH_VISIBLE_OBJECT_END + FOREACH_VISIBLE_OBJECT_END; CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } @@ -157,7 +157,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult { CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base); } - FOREACH_VISIBLE_BASE_END + FOREACH_VISIBLE_BASE_END; CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); return 1; } diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c index e109a54c5e1..49cfc4b71b0 100644 --- a/source/blender/editors/space_clip/tracking_ops_orient.c +++ b/source/blender/editors/space_clip/tracking_ops_orient.c @@ -80,7 +80,7 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip) } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; return camera; } diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 29f5445a7a0..e720eedbb22 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -937,7 +937,7 @@ static void do_outliner_item_activate_tree_element( { ED_object_base_select(BKE_view_layer_base_find(view_layer, object), sel); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } else { BKE_view_layer_base_deselect_all(view_layer); @@ -952,7 +952,7 @@ static void do_outliner_item_activate_tree_element( } } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 4dbc7ac47ef..c30b14d43fa 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -553,7 +553,7 @@ static void group_linkobs2scene_cb( base->flag |= BASE_SELECTED; } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } static void group_instance_cb( diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 7d3fa147355..8c6d7783f01 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -2384,7 +2384,7 @@ void outliner_build_tree( { outliner_add_element(soops, eval_ctx, &soops->tree, ob, NULL, 0, 0); } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; outliner_make_hierarchy(&soops->tree); } else { diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index 5ab0ac9464d..8e6f5228b09 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -91,7 +91,7 @@ static int view3d_copybuffer_exec(bContext *C, wmOperator *op) break; } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } BLI_make_file_string("/", str, BKE_tempdir_base(), "copybuffer.blend"); diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 312a4355af7..62be648bba3 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -221,7 +221,7 @@ BlenderStrokeRenderer::~BlenderStrokeRenderer() { BLI_freelistN(&sc->objects); } - FOREACH_SCENE_COLLECTION_END + FOREACH_SCENE_COLLECTION_END; BLI_freelistN(&view_layer->object_bases); // release materials 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); diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c index b6a57eea899..403a8706295 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim.c +++ b/source/blender/modifiers/intern/MOD_fluidsim.c @@ -120,7 +120,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte } } } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; } } } diff --git a/source/blender/render/intern/include/render_result.h b/source/blender/render/intern/include/render_result.h index 23db993a1a9..03292579d90 100644 --- a/source/blender/render/intern/include/render_result.h +++ b/source/blender/render/intern/include/render_result.h @@ -138,7 +138,7 @@ bool render_result_has_views(struct RenderResult *rr); #define FOREACH_VIEW_LAYER_TO_RENDER_END \ } \ -} +} ((void)0) #endif /* __RENDER_RESULT_H__ */ diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 5edf2a2277c..0480ffe42d9 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -4016,7 +4016,7 @@ static void add_lightgroup(Render *re, Group *group, int exclusive) } } } - FOREACH_GROUP_BASE_END + FOREACH_GROUP_BASE_END; #else UNUSED_VARS(re, exclusive); #endif @@ -4950,7 +4950,7 @@ static void dupli_render_particle_set(const EvaluationContext *eval_ctx, Render { dupli_render_particle_set(eval_ctx, re, object, timeoffset, level+1, enable); } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } static int get_vector_viewlayers(Scene *UNUSED(sce)) @@ -4981,7 +4981,7 @@ static void add_group_render_dupli_obs(const EvaluationContext *eval_ctx, Render } } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } static void database_init_objects(const EvaluationContext *eval_ctx, Render *re, unsigned int UNUSED(renderlay), diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 58b18e46991..19635dd26f2 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -255,7 +255,7 @@ static void env_set_imats(Render *re) mul_m4_m4m4(mat, re->viewmat, ob->obmat); invert_m4_m4(ob->imat, mat); } - FOREACH_SCENE_OBJECT_END + FOREACH_SCENE_OBJECT_END; } /* ------------------------------------------------------------------------- */ diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index ebc4c704adf..285cf8d660b 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -771,7 +771,7 @@ int RE_engine_render(Render *re, int do_all) DEG_graph_free(depsgraph); DEG_evaluation_context_free(eval_ctx); } - FOREACH_VIEW_LAYER_TO_RENDER_END + FOREACH_VIEW_LAYER_TO_RENDER_END; } engine->tile_x = 0; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 57431716b29..33c633c76bc 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2043,7 +2043,7 @@ static void tag_dependend_objects_for_render(Scene *scene, int UNUSED(renderlay) } } } - FOREACH_OBJECT_RENDERABLE_END + FOREACH_OBJECT_RENDERABLE_END; } #endif diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index e46c74a3620..c5d1dfc50f4 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -406,7 +406,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf #undef RENDER_LAYER_ADD_PASS_SAFE } } - FOREACH_VIEW_LAYER_TO_RENDER_END + FOREACH_VIEW_LAYER_TO_RENDER_END; /* sss, previewrender and envmap don't do layers, so we make a default one */ if (BLI_listbase_is_empty(&rr->layers) && !(layername && layername[0])) { diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index ffaad615df2..c390bff09a4 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2095,7 +2095,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, } } } - FOREACH_GROUP_OBJECT_END + FOREACH_GROUP_OBJECT_END; } } } diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index a521bc0c942..0e6b04c6df5 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -761,7 +761,7 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level) } m_groupGameObjects.insert(gameobj); } - FOREACH_GROUP_BASE_END + FOREACH_GROUP_BASE_END; set<CValue*>::iterator oit; for (oit=m_groupGameObjects.begin(); oit != m_groupGameObjects.end(); oit++) |