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 /source/blender/makesrna/intern | |
parent | a687d98e67823932f95bc3c1b1452109282a3e41 (diff) | |
parent | 6429e6c91ef4422083ed56b068dea636a322fe12 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/makesrna/intern')
-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 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; |