diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 33 |
1 files changed, 17 insertions, 16 deletions
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; |