diff options
author | Jacques Lucke <jacques@blender.org> | 2021-11-22 12:18:08 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-11-22 12:18:08 +0300 |
commit | 31864a40bad214ebf12c046cf3efdd962d2dd000 (patch) | |
tree | 5c4d525a81a518ab561b015a6460f8b5ecd37bf8 /source/blender/blenkernel | |
parent | c850189adf6dcf98dfe0140df30b6186e17fb040 (diff) |
Cleanup: use simple data member instead of callback
This really doesn't have to be a callback currently, since it is always
the same `CPPType` for a socket type.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index bbeb01de0ff..5ed1b512fd5 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -121,12 +121,11 @@ class MFDataType; } // namespace fn } // namespace blender +using CPPTypeHandle = blender::fn::CPPType; using NodeMultiFunctionBuildFunction = void (*)(blender::nodes::NodeMultiFunctionBuilder &builder); using NodeGeometryExecFunction = void (*)(blender::nodes::GeoNodeExecParams params); using NodeDeclareFunction = void (*)(blender::nodes::NodeDeclarationBuilder &builder); -using SocketGetCPPTypeFunction = const blender::fn::CPPType *(*)(); using SocketGetCPPValueFunction = void (*)(const struct bNodeSocket &socket, void *r_value); -using SocketGetGeometryNodesCPPTypeFunction = const blender::fn::CPPType *(*)(); using SocketGetGeometryNodesCPPValueFunction = void (*)(const struct bNodeSocket &socket, void *r_value); @@ -138,6 +137,7 @@ typedef void *SocketGetCPPTypeFunction; typedef void *SocketGetGeometryNodesCPPTypeFunction; typedef void *SocketGetGeometryNodesCPPValueFunction; typedef void *SocketGetCPPValueFunction; +typedef struct CPPTypeHandle CPPTypeHandle; #endif /** @@ -197,11 +197,11 @@ typedef struct bNodeSocketType { void (*free_self)(struct bNodeSocketType *stype); /* Return the CPPType of this socket. */ - SocketGetCPPTypeFunction get_base_cpp_type; + const CPPTypeHandle *base_cpp_type; /* Get the value of this socket in a generic way. */ SocketGetCPPValueFunction get_base_cpp_value; /* Get geometry nodes cpp type. */ - SocketGetGeometryNodesCPPTypeFunction get_geometry_nodes_cpp_type; + const CPPTypeHandle *geometry_nodes_cpp_type; /* Get geometry nodes cpp value. */ SocketGetGeometryNodesCPPValueFunction get_geometry_nodes_cpp_value; } bNodeSocketType; |