diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 07:46:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-30 07:49:06 +0300 |
commit | a760e73dcf6f0a0da901359d1456ad5ca180ebeb (patch) | |
tree | 9e0be802377a153e8d6fc37b2eec163be6ff5d12 | |
parent | a687d98e67823932f95bc3c1b1452109282a3e41 (diff) | |
parent | 6429e6c91ef4422083ed56b068dea636a322fe12 (diff) |
Merge branch 'master' into blender2.8
29 files changed, 150 insertions, 186 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 07a50a782c5..5f0635037c2 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -37,7 +37,7 @@ #include "DNA_listBase.h" -/* for FOREACH_NODETREE */ +/* for FOREACH_NODETREE_BEGIN */ #include "DNA_lamp_types.h" #include "DNA_material_types.h" #include "DNA_node_types.h" @@ -410,7 +410,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); @@ -646,17 +646,17 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree); * Examples: * * \code{.c} - * FOREACH_NODETREE(bmain, nodetree, id) { + * FOREACH_NODETREE_BEGIN(bmain, nodetree, id) { * if (id == nodetree) * printf("This is a linkable node tree"); - * } FOREACH_NODETREE_END + * } FOREACH_NODETREE_END; * - * FOREACH_NODETREE(bmain, nodetree, id) { + * FOREACH_NODETREE_BEGIN(bmain, nodetree, id) { * if (nodetree->idname == "ShaderNodeTree") * printf("This is a shader node tree); * if (GS(id) == ID_MA) * printf(" and it's owned by a material"); - * } FOREACH_NODETREE_END + * } FOREACH_NODETREE_END; * \endcode * * \{ @@ -677,7 +677,7 @@ void BKE_node_tree_iter_init(struct NodeTreeIterStore *ntreeiter, struct Main *b bool BKE_node_tree_iter_step(struct NodeTreeIterStore *ntreeiter, struct bNodeTree **r_nodetree, struct ID **r_id); -#define FOREACH_NODETREE(bmain, _nodetree, _id) \ +#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id) \ { \ struct NodeTreeIterStore _nstore; \ bNodeTree *_nodetree; \ @@ -690,7 +690,7 @@ bool BKE_node_tree_iter_step(struct NodeTreeIterStore *ntreeiter, #define FOREACH_NODETREE_END \ } \ } \ -} +} ((void)0) /** \} */ diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 00fd4ded8c6..ebe732d2336 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -90,7 +90,7 @@ void BKE_sequence_iterator_end(SeqIterator *iter); #define SEQ_END \ } \ BKE_sequence_iterator_end(&iter_macro); \ - } + } ((void)0) typedef struct SeqRenderData { struct Main *bmain; diff --git a/source/blender/blenkernel/intern/bpath.c b/source/blender/blenkernel/intern/bpath.c index 88a4b7905ef..0ada712a855 100644 --- a/source/blender/blenkernel/intern/bpath.c +++ b/source/blender/blenkernel/intern/bpath.c @@ -616,9 +616,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/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 15d08f5a230..621cd6cf5c8 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2792,7 +2792,7 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id) * could be with the current depsgraph design/ */ if (idtype == ID_IM) { - FOREACH_NODETREE(bmain, ntree, parent_id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, parent_id) { if (ntree->type == NTREE_SHADER) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -2802,7 +2802,7 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (idtype == ID_MSK) { diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index d3ac5a39c9f..aae208dd967 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1944,8 +1944,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 902cabad857..f0f23eaa87d 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -426,8 +426,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; } diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index ba151ca6925..e5d313e5018 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -361,10 +361,10 @@ static void libblock_remap_data_postprocess_nodetree_update(Main *bmain, ID *new ntreeVerifyNodes(bmain, new_id); /* Update node trees as necessary. */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { /* make an update call for the tree */ ntreeUpdateTree(bmain, ntree); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } /** diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 183fa37f84b..04cc58f373f 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -229,7 +229,7 @@ static void update_typeinfo(Main *bmain, const struct bContext *C, bNodeTreeType if (!bmain) return; - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { bNode *node; bNodeSocket *sock; @@ -260,7 +260,7 @@ static void update_typeinfo(Main *bmain, const struct bContext *C, bNodeTreeType if (socktype && STREQ(sock->idname, socktype->idname)) node_socket_set_typeinfo(ntree, sock, unregister ? NULL : socktype); } - FOREACH_NODETREE_END + FOREACH_NODETREE_END; } /* Try to initialize all typeinfo in a node tree. @@ -921,7 +921,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 */ @@ -929,7 +929,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; @@ -2991,13 +2991,13 @@ static void ntree_validate_links(bNodeTree *ntree) void ntreeVerifyNodes(struct Main *main, struct ID *id) { - FOREACH_NODETREE(main, ntree, owner_id) { + FOREACH_NODETREE_BEGIN(main, ntree, owner_id) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) if (node->typeinfo->verifyfunc) node->typeinfo->verifyfunc(ntree, node, id); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } void ntreeUpdateTree(Main *bmain, bNodeTree *ntree) @@ -3645,23 +3645,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; @@ -3683,7 +3683,7 @@ void free_nodesystem(void) /* -------------------------------------------------------------------- */ -/* NodeTree Iterator Helpers (FOREACH_NODETREE) */ +/* NodeTree Iterator Helpers (FOREACH_NODETREE_BEGIN) */ void BKE_node_tree_iter_init(struct NodeTreeIterStore *ntreeiter, struct Main *bmain) { diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 0d506effae6..c02a47db321 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -474,8 +474,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 fe4d38e1618..229d0d04423 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3135,16 +3135,16 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) #endif /* set node->typeinfo pointers */ - FOREACH_NODETREE (main, ntree, id) { + FOREACH_NODETREE_BEGIN (main, ntree, id) { ntreeSetTypes(NULL, ntree); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; /* verify static socket templates */ - FOREACH_NODETREE (main, ntree, id) { + FOREACH_NODETREE_BEGIN (main, ntree, id) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) node_verify_socket_templates(ntree, node); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; { bool has_old_groups = false; @@ -3160,7 +3160,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) } if (has_old_groups) { - FOREACH_NODETREE (main, ntree, id) { + FOREACH_NODETREE_BEGIN (main, ntree, id) { /* updates external links for all group nodes in a tree */ bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -3170,7 +3170,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) lib_node_do_versions_group_indices(node); } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } for (bNodeTree *ntree = main->nodetree.first; ntree; ntree = ntree->id.next) { @@ -3191,7 +3191,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) * so have to clean up all of them ... */ - FOREACH_NODETREE(main, ntree, id) { + FOREACH_NODETREE_BEGIN(main, ntree, id) { if (ntree->flag & NTREE_DO_VERSIONS_CUSTOMNODES_GROUP) { bNode *input_node = NULL, *output_node = NULL; int num_inputs = 0, num_outputs = 0; @@ -3277,7 +3277,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) ntree->flag &= ~(NTREE_DO_VERSIONS_CUSTOMNODES_GROUP | NTREE_DO_VERSIONS_CUSTOMNODES_GROUP_CREATE_INTERFACE); } } - FOREACH_NODETREE_END + FOREACH_NODETREE_END; } /* verify all group user nodes */ @@ -3287,10 +3287,10 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) /* make update calls where necessary */ { - FOREACH_NODETREE(main, ntree, id) { + FOREACH_NODETREE_BEGIN(main, ntree, id) { /* make an update call for the tree */ ntreeUpdateTree(main, ntree); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } } @@ -6119,8 +6119,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) { @@ -6406,8 +6405,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 */ { @@ -9999,8 +9997,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 0d7e05edb2d..54e1512c953 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -675,8 +675,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; } } @@ -1389,8 +1388,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 */ @@ -1653,8 +1651,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; } } @@ -2107,8 +2104,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; } } @@ -2183,7 +2179,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) if (bmain->versionfile < 259 || (bmain->versionfile == 259 && bmain->subversionfile < 2)) { { /* Convert default socket values from bNodeStack */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { bNode *node; bNodeSocket *sock; @@ -2200,8 +2196,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) do_versions_socket_default_value_259(sock); ntree->update |= NTREE_UPDATE; - } - FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } { diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 9cb96f6d8b3..d1589aa0d5e 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -665,7 +665,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 2)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -679,7 +679,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 4)) { @@ -1245,7 +1245,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 9)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1258,7 +1258,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 10)) { @@ -1273,7 +1273,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1285,7 +1285,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } { @@ -1335,7 +1335,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 13)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1348,13 +1348,13 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 14)) { ParticleSettings *part; - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1367,7 +1367,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; /* keep compatibility for dupliobject particle size */ for (part = bmain->particle.first; part; part = part->id.next) @@ -1377,7 +1377,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 17)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1393,7 +1393,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 18)) { @@ -1426,8 +1426,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; } } } @@ -1507,14 +1506,14 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (bmain->versionfile < 264 || (bmain->versionfile == 264 && bmain->subversionfile < 1)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) if (node->type == SH_NODE_TEX_COORD) node->flag |= NODE_OPTIONS; } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (bmain->versionfile < 264 || (bmain->versionfile == 264 && bmain->subversionfile < 2)) { @@ -1616,7 +1615,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Fix for bug #32982, internal_links list could get corrupted from r51630 onward. * Simply remove bad internal_links lists to avoid NULL pointers. */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { bNode *node; bNodeLink *link, *nextlink; @@ -1628,7 +1627,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (bmain->versionfile < 264 || (bmain->versionfile == 264 && bmain->subversionfile < 7)) { @@ -1733,8 +1732,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; @@ -1758,7 +1756,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1772,7 +1770,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } else if (bmain->versionfile < 266 || (bmain->versionfile == 266 && bmain->subversionfile < 1)) { /* texture use alpha was removed for 2.66 but added back again for 2.66a, @@ -1837,7 +1835,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) // add storage for compositor translate nodes when not existing if (MAIN_VERSION_OLDER(bmain, 265, 11)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -1846,13 +1844,13 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (MAIN_VERSION_OLDER(bmain, 266, 2)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { do_versions_nodetree_customnodes(ntree, ((ID *)ntree == id)); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (MAIN_VERSION_OLDER(bmain, 266, 2)) { @@ -1891,7 +1889,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Set flag for delayed do_versions in lib_verify_nodetree. It needs valid typeinfo pointers ... */ { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { /* XXX This should be kept without version check for now! * As long as USE_NODE_COMPAT_CUSTOMNODES is active, files will write links * to tree interface sockets for forward compatibility. These links need to be removed again @@ -1906,7 +1904,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) if (MAIN_VERSION_OLDER(bmain, 266, 2)) ntree->flag |= NTREE_DO_VERSIONS_CUSTOMNODES_GROUP_CREATE_INTERFACE; } - FOREACH_NODETREE_END + FOREACH_NODETREE_END; } if (MAIN_VERSION_OLDER(bmain, 266, 3)) { @@ -1918,14 +1916,14 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) * so do this now to ensure old files don't break. */ bNode *node; - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (id == &ntree->id) continue; /* already fixed for node groups */ for (node = ntree->nodes.first; node; node = node->next) nodeUniqueName(ntree, node); } - FOREACH_NODETREE_END + FOREACH_NODETREE_END; } } @@ -2208,7 +2206,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) if (!MAIN_VERSION_ATLEAST(bmain, 269, 1)) { /* Removal of Cycles SSS Compatible falloff */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -2219,12 +2217,12 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (!MAIN_VERSION_ATLEAST(bmain, 269, 2)) { /* Initialize CDL settings for Color Balance nodes */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -2246,7 +2244,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (!MAIN_VERSION_ATLEAST(bmain, 269, 3)) { @@ -2369,11 +2367,10 @@ 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(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -2391,7 +2388,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (!DNA_struct_elem_find(fd->filesdna, "MovieTrackingPlaneTrack", "float", "image_opacity")) { diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index c45db306006..568b3c580a2 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -427,7 +427,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } /* nodes don't use fixed node->id any more, clean up */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -436,7 +436,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; { bScreen *screen; @@ -790,7 +790,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } if (!DNA_struct_elem_find(fd->filesdna, "NodePlaneTrackDeformData", "char", "flag")) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { @@ -803,7 +803,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - FOREACH_NODETREE_END + FOREACH_NODETREE_END; } if (!DNA_struct_elem_find(fd->filesdna, "Camera", "GPUDOFSettings", "gpu_dof")) { @@ -917,8 +917,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) { @@ -1286,8 +1285,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 */ @@ -1635,7 +1633,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) /* Fix for T50736, Glare comp node using same var for two different things. */ if (!DNA_struct_elem_find(fd->filesdna, "NodeGlare", "char", "star_45")) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { ntreeSetTypes(NULL, ntree); for (bNode *node = ntree->nodes.first; node; node = node->next) { @@ -1654,7 +1652,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (!DNA_struct_elem_find(fd->filesdna, "SurfaceDeformModifierData", "float", "mat[4][4]")) { @@ -1668,11 +1666,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { do_versions_compositor_render_passes(ntree); } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (!MAIN_VERSION_ATLEAST(bmain, 279, 0)) { @@ -1785,7 +1783,7 @@ void do_versions_after_linking_270(Main *bmain) { /* To be added to next subversion bump! */ if (!MAIN_VERSION_ATLEAST(bmain, 279, 0)) { - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_COMPOSIT) { ntreeSetTypes(NULL, ntree); for (bNode *node = ntree->nodes.first; node; node = node->next) { @@ -1794,7 +1792,7 @@ void do_versions_after_linking_270(Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (!MAIN_VERSION_ATLEAST(bmain, 279, 2)) { diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 16f436cb378..434153fc7b9 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1008,7 +1008,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) * Also, metallic node is now unified into the principled node. */ eNTreeDoVersionErrors error = NTREE_DOVERSION_NO_ERROR; - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { for (bNode *node = ntree->nodes.first; node; node = node->next) { if (node->type == 194 /* SH_NODE_EEVEE_METALLIC */ && @@ -1040,7 +1040,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; if (error & NTREE_DOVERSION_NEED_OUTPUT) { BKE_report(fd->reports, RPT_ERROR, "Eevee material conversion problem. Error in console"); diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index e0fb31b223b..3c8e69a5fba 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1254,8 +1254,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; @@ -2393,8 +2392,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; } } @@ -2550,8 +2548,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 6398d0f59f2..be708697ac6 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2572,8 +2572,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) { @@ -2639,8 +2638,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) { @@ -3157,7 +3155,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree) #ifdef USE_NODE_COMPAT_CUSTOMNODES static void customnodes_add_deprecated_data(Main *mainvar) { - FOREACH_NODETREE(mainvar, ntree, id) { + FOREACH_NODETREE_BEGIN(mainvar, ntree, id) { bNodeLink *link, *last_link = ntree->links.last; /* only do this for node groups */ @@ -3204,13 +3202,12 @@ static void customnodes_add_deprecated_data(Main *mainvar) break; } } - } - FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } static void customnodes_free_deprecated_data(Main *mainvar) { - FOREACH_NODETREE(mainvar, ntree, id) { + FOREACH_NODETREE_BEGIN(mainvar, ntree, id) { bNodeLink *link, *next_link; for (link = ntree->links.first; link; link = next_link) { @@ -3219,8 +3216,7 @@ static void customnodes_free_deprecated_data(Main *mainvar) nodeRemLink(ntree, link); } } - } - FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } #endif diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index da92b9e41be..5121f1534bd 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1925,7 +1925,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo } /* Relink nodetrees' pointers that have been duplicated. */ - FOREACH_NODETREE(bmain, ntree, id) + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { /* This is a bit convoluted, we want to root ntree of copied IDs and only those, * so we first check that old ID has been copied and that ntree is root tree of old ID, @@ -1934,7 +1934,7 @@ void ED_object_single_users(Main *bmain, Scene *scene, const bool full, const bo ntree = ntreeFromID(id->newid); BKE_libblock_relink_to_newid(&ntree->id); } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; /* Relink datablock pointer properties */ { diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 7f51f9e4149..3ce4965b284 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 b161de9f472..67727c661a0 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1136,7 +1136,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 b5d47809606..10ec293082f 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2986,7 +2986,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; @@ -3004,7 +3004,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_NODE_COMPOSITING; diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index f00b745a317..8ec6d9332d3 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -174,11 +174,11 @@ void ED_node_tag_update_nodetree(Main *bmain, bNodeTree *ntree, bNode *node) /* look through all datablocks, to support groups */ if (do_tag_update) { - FOREACH_NODETREE(bmain, tntree, id) { + FOREACH_NODETREE_BEGIN(bmain, tntree, id) { /* check if nodetree uses the group */ if (ntreeHasTree(tntree, ntree)) ED_node_tag_update_id(id); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } if (ntree->type == NTREE_TEXTURE) diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 746a37fe565..86b7ebf46b4 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -330,10 +330,10 @@ void snode_dag_update(bContext *C, SpaceNode *snode) /* for groups, update all ID's using this */ if (snode->edittree != snode->nodetree) { - FOREACH_NODETREE(bmain, tntree, id) { + FOREACH_NODETREE_BEGIN(bmain, tntree, id) { if (ntreeHasTree(tntree, snode->edittree)) DEG_id_tag_update(id, 0); - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; } DEG_id_tag_update(snode->id, 0); @@ -2390,17 +2390,17 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op) if (text) { /* clear flags for recursion check */ - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) ntree->done = false; - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; - FOREACH_NODETREE(bmain, ntree, id) { + FOREACH_NODETREE_BEGIN(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) { if (!ntree->done) found |= node_shader_script_update_text_recursive(engine, type, ntree, text); } - } FOREACH_NODETREE_END + } FOREACH_NODETREE_END; if (!found) BKE_report(op->reports, RPT_INFO, "Text not used by any node, no update done"); diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 47e9bc7fa26..e7a9db20103 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -460,8 +460,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 74744f63321..e55b8d17cd4 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -219,8 +219,7 @@ static void seq_proxy_build_job(const bContext *C) if ((seq->flag & SELECT)) { BKE_sequencer_proxy_rebuild_context(pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue); } - } - SEQ_END + } SEQ_END; BLI_gset_free(file_list, MEM_freeN); @@ -457,8 +456,7 @@ void ED_sequencer_deselect_all(Scene *scene) SEQP_BEGIN (ed, seq) { seq->flag &= ~SEQ_ALLSEL; - } - SEQ_END + } SEQ_END; } @@ -647,8 +645,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) @@ -995,8 +992,7 @@ static void set_filter_seq(Scene *scene) } } - } - SEQ_END + } SEQ_END; } #endif @@ -1036,8 +1032,7 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene *scene) printf("new %s\n", seq->strip->dir); } } - } - SEQ_END + } SEQ_END; } @@ -3498,8 +3493,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); @@ -3577,8 +3571,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); @@ -3926,8 +3919,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 5fbe134b301..433f1ca8ee5 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -382,8 +382,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 f540930b1d5..86f0f2d85bf 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -1141,7 +1141,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 3742c70da17..ca532b16bc3 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -292,26 +292,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; } @@ -319,13 +319,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; } @@ -335,7 +335,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; @@ -350,7 +350,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; @@ -366,26 +366,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; } @@ -393,13 +393,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; } @@ -411,7 +411,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; @@ -427,7 +427,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; |