diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/nodes/NOD_socket.h | 8 | ||||
-rw-r--r-- | source/blender/nodes/intern/node_socket.cc (renamed from source/blender/nodes/intern/node_socket.c) | 8 |
4 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index f17e7fe39e0..6312c84cf9f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -9020,7 +9020,7 @@ static void rna_def_node_socket_standard_types(BlenderRNA *brna) /* XXX These types should eventually be registered at runtime. * Then use the nodeStaticSocketType and nodeStaticSocketInterfaceType functions * to get the idname strings from int type and subtype - * (see node_socket.c, register_standard_node_socket_types). + * (see node_socket.cc, register_standard_node_socket_types). */ rna_def_node_socket_float(brna, "NodeSocketFloat", "NodeSocketInterfaceFloat", PROP_NONE); diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 80bf0f7c5e2..31b5e922dab 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -273,7 +273,7 @@ set(SRC intern/node_common.c intern/node_exec.c - intern/node_socket.c + intern/node_socket.cc intern/node_util.c composite/node_composite_util.h diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h index b1b1a0e40c6..ce6f0da4aee 100644 --- a/source/blender/nodes/NOD_socket.h +++ b/source/blender/nodes/NOD_socket.h @@ -35,6 +35,10 @@ struct bNode; struct bNodeTree; +#ifdef __cplusplus +extern "C" { +#endif + struct bNodeSocket *node_add_socket_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp, @@ -46,4 +50,8 @@ void node_socket_init_default_value(struct bNodeSocket *sock); void node_socket_copy_default_value(struct bNodeSocket *to, const struct bNodeSocket *from); void register_standard_node_socket_types(void); +#ifdef __cplusplus +} #endif + +#endif /* __NOD_SOCKET_H__ */ diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.cc index 529fc036c7c..053e4e138c8 100644 --- a/source/blender/nodes/intern/node_socket.c +++ b/source/blender/nodes/intern/node_socket.cc @@ -423,10 +423,10 @@ static void standard_node_socket_interface_from_socket(bNodeTree *UNUSED(ntree), node_socket_copy_default_value(stemp, sock); } +extern "C" void ED_init_standard_node_socket_type(bNodeSocketType *); + static bNodeSocketType *make_standard_socket_type(int type, int subtype) { - extern void ED_init_standard_node_socket_type(bNodeSocketType *); - const char *socket_idname = nodeStaticSocketType(type, subtype); const char *interface_idname = nodeStaticSocketInterfaceType(type, subtype); bNodeSocketType *stype; @@ -467,10 +467,10 @@ static bNodeSocketType *make_standard_socket_type(int type, int subtype) return stype; } +extern "C" void ED_init_node_socket_type_virtual(bNodeSocketType *); + static bNodeSocketType *make_socket_type_virtual(void) { - extern void ED_init_node_socket_type_virtual(bNodeSocketType *); - const char *socket_idname = "NodeSocketVirtual"; bNodeSocketType *stype; StructRNA *srna; |