diff options
Diffstat (limited to 'source')
23 files changed, 64 insertions, 97 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 852285492d2..3d78b95001d 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -413,7 +413,7 @@ struct GHashIterator *nodeTypeGetIterator(void); #define NODE_TYPES_END \ } \ BLI_ghashIterator_free(__node_type_iter__); \ -} +} ((void)0) struct bNodeSocketType *nodeSocketTypeFind(const char *idname); void nodeRegisterSocketType(struct bNodeSocketType *stype); diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index c408597de32..705143480d2 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -89,7 +89,7 @@ void BKE_sequence_iterator_end(SeqIterator *iter); #define SEQ_END \ } \ BKE_sequence_iterator_end(&iter_macro); \ - } + } ((void)0) typedef struct SeqRenderData { struct EvaluationContext *eval_ctx; diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 0b191e1f69b..f80a13343d5 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -631,9 +631,7 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int rewrite_path_fixed(seq->strip->dir, visit_cb, absbase, bpath_user_data); } } - - } - SEQ_END + } SEQ_END; } break; } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index c11f2368197..effbff37c33 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1976,8 +1976,7 @@ void do_versions_ipos_to_animato(Main *bmain) id_us_min(&seq->ipo->id); seq->ipo = NULL; - } - SEQ_END + } SEQ_END; } } diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 3292f0d6640..f5367f6f8b3 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -455,8 +455,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call for (SequenceModifierData *smd = seq->modifiers.first; smd; smd = smd->next) { CALLBACK_INVOKE(smd->mask_id, IDWALK_CB_USER); } - } - SEQ_END + } SEQ_END; } CALLBACK_INVOKE(scene->gpd, IDWALK_CB_USER); diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 82f619da9c6..2946fb29863 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -918,7 +918,7 @@ bNode *nodeAddStaticNode(const struct bContext *C, bNodeTree *ntree, int type) { const char *idname = NULL; - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { /* do an extra poll here, because some int types are used * for multiple node types, this helps find the desired type */ @@ -926,7 +926,7 @@ bNode *nodeAddStaticNode(const struct bContext *C, bNodeTree *ntree, int type) idname = ntype->idname; break; } - NODE_TYPES_END + } NODE_TYPES_END; if (!idname) { printf("Error: static node type %d undefined\n", type); return NULL; @@ -3732,23 +3732,23 @@ void init_nodesystem(void) void free_nodesystem(void) { if (nodetypes_hash) { - NODE_TYPES_BEGIN(nt) + NODE_TYPES_BEGIN(nt) { if (nt->ext.free) { nt->ext.free(nt->ext.data); } - NODE_TYPES_END + } NODE_TYPES_END; BLI_ghash_free(nodetypes_hash, NULL, node_free_type); nodetypes_hash = NULL; } if (nodesockettypes_hash) { - NODE_SOCKET_TYPES_BEGIN(st) + NODE_SOCKET_TYPES_BEGIN(st) { if (st->ext_socket.free) st->ext_socket.free(st->ext_socket.data); if (st->ext_interface.free) st->ext_interface.free(st->ext_interface.data); - NODE_SOCKET_TYPES_END + } NODE_SOCKET_TYPES_END; BLI_ghash_free(nodesockettypes_hash, NULL, node_free_socket_type); nodesockettypes_hash = NULL; diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index c2a96d4f1ff..57b3cd41047 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -469,8 +469,7 @@ void BKE_sequencer_editing_free(Scene *scene, const bool do_id_user) { /* handle cache freeing above */ BKE_sequence_free_ex(scene, seq, false, do_id_user); - } - SEQ_END + } SEQ_END; BLI_freelistN(&ed->metastack); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ead3b324644..57d4978c776 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5867,8 +5867,7 @@ static void lib_link_scene(FileData *fd, Main *main) BLI_listbase_clear(&seq->anims); lib_link_sequence_modifiers(fd, sce, &seq->modifiers); - } - SEQ_END + } SEQ_END; for (TimeMarker *marker = sce->markers.first; marker; marker = marker->next) { if (marker->camera) { @@ -6162,8 +6161,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) } direct_link_sequence_modifiers(fd, &seq->modifiers); - } - SEQ_END + } SEQ_END; /* link metastack, slight abuse of structs here, have to restore pointer to internal part in struct */ { @@ -9744,8 +9742,7 @@ static void expand_scene(FileData *fd, Main *mainvar, Scene *sce) if (seq->clip) expand_doit(fd, mainvar, seq->clip); if (seq->mask) expand_doit(fd, mainvar, seq->mask); if (seq->sound) expand_doit(fd, mainvar, seq->sound); - } - SEQ_END + } SEQ_END; } if (sce->rigidbody_world) { diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 835acbc853d..a6d8b6de606 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -793,8 +793,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } #undef SEQ_USE_PROXY_CUSTOM_DIR #undef SEQ_USE_PROXY_CUSTOM_FILE - } - SEQ_END + } SEQ_END; } } @@ -1758,8 +1757,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) SEQ_BEGIN (sce->ed, seq) { seq->volume = 1.0f; - } - SEQ_END + } SEQ_END; } /* particle brush strength factor was changed from int to float */ @@ -2034,8 +2032,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (seq->sat == 0.0f) { seq->sat = 1.0f; } - } - SEQ_END + } SEQ_END; } } @@ -2580,8 +2577,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) SEQ_BEGIN(scene->ed, seq) { seq->pitch = 1.0f; - } - SEQ_END + } SEQ_END; } } diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index f630dbe1aaf..af291981e7f 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -1520,8 +1520,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) MEM_freeN(strip->color_balance); strip->color_balance = NULL; } - } - SEQ_END + } SEQ_END; } } } @@ -1880,8 +1879,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) else { BKE_sequence_alpha_mode_from_extension(seq); } - } - SEQ_END + } SEQ_END; if (scene->r.bake_samples == 0) scene->r.bake_samples = 256; @@ -2586,8 +2584,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) WipeVars *wv = seq->effectdata; wv->angle = DEG2RADF(wv->angle); } - } - SEQ_END + } SEQ_END; } FOREACH_NODETREE_BEGIN(bmain, ntree, id) { diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 64c6cc9a052..7884a628147 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -940,8 +940,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) #undef SEQ_USE_PROXY_CUSTOM_DIR #undef SEQ_USE_PROXY_CUSTOM_FILE - } - SEQ_END + } SEQ_END; } for (screen = bmain->screen.first; screen; screen = screen->id.next) { @@ -1325,8 +1324,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) copy_v4_fl(data->color, 1.0f); data->shadow_color[3] = 1.0f; } - } - SEQ_END + } SEQ_END; } /* Adding "Properties" region to DopeSheet */ diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 48d90787b51..9708e24b351 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1816,8 +1816,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) { if (seq->type == SEQ_TYPE_IMAGE || seq->type == SEQ_TYPE_MOVIE) seq->alpha_mode = SEQ_ALPHA_STRAIGHT; - } - SEQ_END + } SEQ_END; } sce = sce->id.next; @@ -3184,8 +3183,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) { if (seq->blend_mode == 0) seq->blend_opacity = 100.0f; - } - SEQ_END + } SEQ_END; } } @@ -3540,8 +3538,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) if (seq->strip && seq->strip->proxy) { seq->strip->proxy->quality = 90; } - } - SEQ_END + } SEQ_END; } sce = sce->id.next; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 2283928b1a8..4f48318582a 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2565,8 +2565,7 @@ static void write_scene(WriteData *wd, Scene *sce) seq->strip->done = false; } writestruct(wd, DATA, Sequence, 1, seq); - } - SEQ_END + } SEQ_END; SEQ_BEGIN(ed, seq) { @@ -2632,8 +2631,7 @@ static void write_scene(WriteData *wd, Scene *sce) } write_sequence_modifiers(wd, &seq->modifiers); - } - SEQ_END + } SEQ_END; /* new; meta stack too, even when its nasty restore code */ for (MetaStack *ms = ed->metastack.first; ms; ms = ms->next) { diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index b605bd6e1a7..832505c2281 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -267,8 +267,7 @@ static void sound_update_animation_flags(Scene *scene) SEQ_BEGIN(scene->ed, seq) { BKE_sequencer_recursive_apply(seq, sound_update_animation_flags_cb, scene); - } - SEQ_END + } SEQ_END; fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, "audio_volume", 0, &driven); if (fcu || driven) diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 561b7b99d59..df303a7bf11 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1134,7 +1134,7 @@ static void image_sequence_get_frame_ranges(PointerRNA *ptr, ListBase *frames_al BLI_addtail(&frame_range->frames, frame); MEM_freeN(filename); } - RNA_END + RNA_END; } static int image_cmp_frame(const void *a, const void *b) diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 46172da6b04..0dc057e754b 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -3057,7 +3057,7 @@ void ED_node_init_butfuncs(void) NodeSocketTypeUndefined.interface_draw_color = node_socket_undefined_interface_draw_color; /* node type ui functions */ - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { /* default ui functions */ ntype->draw_nodetype = node_draw_default; ntype->draw_nodetype_prepare = node_update_default; @@ -3075,7 +3075,7 @@ void ED_node_init_butfuncs(void) /* define update callbacks for socket properties */ node_template_properties_update(ntype); - NODE_TYPES_END + } NODE_TYPES_END; /* tree type icons */ ntreeType_Composite->ui_icon = ICON_RENDERLAYERS; diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index c45a5c650ee..6995744f235 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -473,8 +473,7 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname) } BLI_array_append(sorted_ntypes, ntype); - } - NODE_TYPES_END + } NODE_TYPES_END; qsort(sorted_ntypes, BLI_array_len(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare); diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 04cb5c7a37c..d9cc7cb2c36 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -217,8 +217,7 @@ static void seq_proxy_build_job(const bContext *C) if ((seq->flag & SELECT)) { BKE_sequencer_proxy_rebuild_context(pj->main, pj->scene, seq, file_list, &pj->queue); } - } - SEQ_END + } SEQ_END; BLI_gset_free(file_list, MEM_freeN); @@ -455,8 +454,7 @@ void ED_sequencer_deselect_all(Scene *scene) SEQP_BEGIN (ed, seq) { seq->flag &= ~SEQ_ALLSEL; - } - SEQ_END + } SEQ_END; } @@ -645,8 +643,7 @@ static void del_seq_clear_modifiers_recurs(Scene *scene, Sequence *deleting_sequ } } } - } - SEQ_END + } SEQ_END; } static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short deleteall) @@ -993,8 +990,7 @@ static void set_filter_seq(Scene *scene) } } - } - SEQ_END + } SEQ_END; } #endif @@ -1034,8 +1030,7 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene *scene) printf("new %s\n", seq->strip->dir); } } - } - SEQ_END + } SEQ_END; } @@ -3518,8 +3513,7 @@ static int sequencer_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) } BKE_sequencer_free_imbuf(scene, &ed->seqbase, false); } - } - SEQ_END + } SEQ_END; BLI_gset_free(file_list, MEM_freeN); @@ -3597,8 +3591,7 @@ static int sequencer_enable_proxies_exec(bContext *C, wmOperator *op) seq->strip->proxy->build_flags &= ~SEQ_PROXY_SKIP_EXISTING; } } - } - SEQ_END + } SEQ_END; WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); @@ -3946,8 +3939,7 @@ static int sequencer_export_subtitles_exec(bContext *C, wmOperator *op) if (seq->type == SEQ_TYPE_TEXT) { BLI_addtail(&text_seq, MEM_dupallocN(seq)); } - } - SEQ_END + } SEQ_END; if (BLI_listbase_is_empty(&text_seq)) { BKE_report(op->reports, RPT_ERROR, "No subtitles (text strips) to export"); diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c index 3c4481b32cb..1b2357ef6a5 100644 --- a/source/blender/editors/space_sequencer/sequencer_modifier.c +++ b/source/blender/editors/space_sequencer/sequencer_modifier.c @@ -247,8 +247,7 @@ static int strip_modifier_copy_exec(bContext *C, wmOperator *op) BKE_sequence_modifier_list_copy(seq_iter, seq); } - } - SEQ_END + } SEQ_END; BKE_sequence_invalidate_cache(scene, seq); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index e01c7994329..1a9ef7970a4 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -381,8 +381,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e seq->flag |= SELECT; recurs_sel_seq(seq); } - } - SEQ_END + } SEQ_END; + { SpaceSeq *sseq = CTX_wm_space_seq(C); if (sseq && sseq->flag & SEQ_MARKER_TRANS) { diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index 1d287025a4e..86c4156ad8b 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1133,8 +1133,7 @@ void IMB_colormanagement_check_file_config(Main *bmain) if (seq->strip) { colormanage_check_colorspace_settings(&seq->strip->colorspace_settings, "sequencer strip"); } - } - SEQ_END + } SEQ_END; } /* ** check input color space settings ** */ diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index a026d8e875e..de46605bc40 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -1091,7 +1091,7 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name); #define RNA_END \ } \ RNA_property_collection_end(&rna_macro_iter); \ - } + } ((void)0) #define RNA_PROP_BEGIN(sptr, itemptr, prop) \ { \ diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 68f0272c035..abb88a44b4c 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -287,26 +287,26 @@ const EnumPropertyItem *rna_node_tree_type_itemf(void *data, bool (*poll)(void * int rna_node_type_to_enum(bNodeType *typeinfo) { int i = 0, result = -1; - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { if (ntype == typeinfo) { result = i; break; } ++i; - NODE_TYPES_END + } NODE_TYPES_END; return result; } int rna_node_idname_to_enum(const char *idname) { int i = 0, result = -1; - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { if (STREQ(ntype->idname, idname)) { result = i; break; } ++i; - NODE_TYPES_END + } NODE_TYPES_END; return result; } @@ -314,13 +314,13 @@ bNodeType *rna_node_type_from_enum(int value) { int i = 0; bNodeType *result = NULL; - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { if (i == value) { result = ntype; break; } ++i; - NODE_TYPES_END + } NODE_TYPES_END; return result; } @@ -330,7 +330,7 @@ const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data, EnumPropertyItem tmp = {0}; int totitem = 0, i = 0; - NODE_TYPES_BEGIN(ntype) + NODE_TYPES_BEGIN(ntype) { if (poll && !poll(data, ntype)) { ++i; continue; @@ -345,7 +345,7 @@ const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data, RNA_enum_item_add(&item, &totitem, &tmp); ++i; - NODE_TYPES_END + } NODE_TYPES_END; if (totitem == 0) { *r_free = false; @@ -361,26 +361,26 @@ const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data, int rna_node_socket_type_to_enum(bNodeSocketType *typeinfo) { int i = 0, result = -1; - NODE_SOCKET_TYPES_BEGIN(stype) + NODE_SOCKET_TYPES_BEGIN(stype) { if (stype == typeinfo) { result = i; break; } ++i; - NODE_SOCKET_TYPES_END + } NODE_SOCKET_TYPES_END; return result; } int rna_node_socket_idname_to_enum(const char *idname) { int i = 0, result = -1; - NODE_SOCKET_TYPES_BEGIN(stype) + NODE_SOCKET_TYPES_BEGIN(stype) { if (STREQ(stype->idname, idname)) { result = i; break; } ++i; - NODE_SOCKET_TYPES_END + } NODE_SOCKET_TYPES_END; return result; } @@ -388,13 +388,13 @@ bNodeSocketType *rna_node_socket_type_from_enum(int value) { int i = 0; bNodeSocketType *result = NULL; - NODE_SOCKET_TYPES_BEGIN(stype) + NODE_SOCKET_TYPES_BEGIN(stype) { if (i == value) { result = stype; break; } ++i; - NODE_SOCKET_TYPES_END + } NODE_SOCKET_TYPES_END; return result; } @@ -406,7 +406,7 @@ const EnumPropertyItem *rna_node_socket_type_itemf( int totitem = 0, i = 0; StructRNA *srna; - NODE_SOCKET_TYPES_BEGIN(stype) + NODE_SOCKET_TYPES_BEGIN(stype) { if (poll && !poll(data, stype)) { ++i; continue; @@ -422,7 +422,8 @@ const EnumPropertyItem *rna_node_socket_type_itemf( RNA_enum_item_add(&item, &totitem, &tmp); ++i; - NODE_SOCKET_TYPES_END + } + NODE_SOCKET_TYPES_END; if (totitem == 0) { *r_free = false; |