diff options
Diffstat (limited to 'source/blender/nodes/intern/node_socket.cc')
-rw-r--r-- | source/blender/nodes/intern/node_socket.cc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/nodes/intern/node_socket.cc b/source/blender/nodes/intern/node_socket.cc index 948c8376460..0ab446d8b0c 100644 --- a/source/blender/nodes/intern/node_socket.cc +++ b/source/blender/nodes/intern/node_socket.cc @@ -10,6 +10,7 @@ #include "DNA_node_types.h" #include "BLI_color.hh" +#include "BLI_cpp_type_make.hh" #include "BLI_listbase.h" #include "BLI_math_vec_types.hh" #include "BLI_string.h" @@ -30,7 +31,6 @@ #include "NOD_node_declaration.hh" #include "NOD_socket.h" -#include "FN_cpp_type_make.hh" #include "FN_field.hh" using namespace blender; @@ -683,11 +683,11 @@ static bNodeSocketType *make_socket_type_virtual() static bNodeSocketType *make_socket_type_bool() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_BOOLEAN, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<bool>(); + socktype->base_cpp_type = &blender::CPPType::get<bool>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(bool *)r_value = ((bNodeSocketValueBoolean *)socket.default_value)->value; }; - socktype->geometry_nodes_cpp_type = &blender::fn::CPPType::get<ValueOrField<bool>>(); + socktype->geometry_nodes_cpp_type = &blender::CPPType::get<ValueOrField<bool>>(); socktype->get_geometry_nodes_cpp_value = [](const bNodeSocket &socket, void *r_value) { bool value; socket.typeinfo->get_base_cpp_value(socket, &value); @@ -699,11 +699,11 @@ static bNodeSocketType *make_socket_type_bool() static bNodeSocketType *make_socket_type_float(PropertySubType subtype) { bNodeSocketType *socktype = make_standard_socket_type(SOCK_FLOAT, subtype); - socktype->base_cpp_type = &blender::fn::CPPType::get<float>(); + socktype->base_cpp_type = &blender::CPPType::get<float>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(float *)r_value = ((bNodeSocketValueFloat *)socket.default_value)->value; }; - socktype->geometry_nodes_cpp_type = &blender::fn::CPPType::get<ValueOrField<float>>(); + socktype->geometry_nodes_cpp_type = &blender::CPPType::get<ValueOrField<float>>(); socktype->get_geometry_nodes_cpp_value = [](const bNodeSocket &socket, void *r_value) { float value; socket.typeinfo->get_base_cpp_value(socket, &value); @@ -715,11 +715,11 @@ static bNodeSocketType *make_socket_type_float(PropertySubType subtype) static bNodeSocketType *make_socket_type_int(PropertySubType subtype) { bNodeSocketType *socktype = make_standard_socket_type(SOCK_INT, subtype); - socktype->base_cpp_type = &blender::fn::CPPType::get<int>(); + socktype->base_cpp_type = &blender::CPPType::get<int>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(int *)r_value = ((bNodeSocketValueInt *)socket.default_value)->value; }; - socktype->geometry_nodes_cpp_type = &blender::fn::CPPType::get<ValueOrField<int>>(); + socktype->geometry_nodes_cpp_type = &blender::CPPType::get<ValueOrField<int>>(); socktype->get_geometry_nodes_cpp_value = [](const bNodeSocket &socket, void *r_value) { int value; socket.typeinfo->get_base_cpp_value(socket, &value); @@ -731,11 +731,11 @@ static bNodeSocketType *make_socket_type_int(PropertySubType subtype) static bNodeSocketType *make_socket_type_vector(PropertySubType subtype) { bNodeSocketType *socktype = make_standard_socket_type(SOCK_VECTOR, subtype); - socktype->base_cpp_type = &blender::fn::CPPType::get<blender::float3>(); + socktype->base_cpp_type = &blender::CPPType::get<blender::float3>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(blender::float3 *)r_value = ((bNodeSocketValueVector *)socket.default_value)->value; }; - socktype->geometry_nodes_cpp_type = &blender::fn::CPPType::get<ValueOrField<blender::float3>>(); + socktype->geometry_nodes_cpp_type = &blender::CPPType::get<ValueOrField<blender::float3>>(); socktype->get_geometry_nodes_cpp_value = [](const bNodeSocket &socket, void *r_value) { blender::float3 value; socket.typeinfo->get_base_cpp_value(socket, &value); @@ -747,12 +747,12 @@ static bNodeSocketType *make_socket_type_vector(PropertySubType subtype) static bNodeSocketType *make_socket_type_rgba() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_RGBA, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<blender::ColorGeometry4f>(); + socktype->base_cpp_type = &blender::CPPType::get<blender::ColorGeometry4f>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(blender::ColorGeometry4f *)r_value = ((bNodeSocketValueRGBA *)socket.default_value)->value; }; socktype->geometry_nodes_cpp_type = - &blender::fn::CPPType::get<ValueOrField<blender::ColorGeometry4f>>(); + &blender::CPPType::get<ValueOrField<blender::ColorGeometry4f>>(); socktype->get_geometry_nodes_cpp_value = [](const bNodeSocket &socket, void *r_value) { blender::ColorGeometry4f value; socket.typeinfo->get_base_cpp_value(socket, &value); @@ -764,11 +764,11 @@ static bNodeSocketType *make_socket_type_rgba() static bNodeSocketType *make_socket_type_string() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_STRING, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<std::string>(); + socktype->base_cpp_type = &blender::CPPType::get<std::string>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { new (r_value) std::string(((bNodeSocketValueString *)socket.default_value)->value); }; - socktype->geometry_nodes_cpp_type = &blender::fn::CPPType::get<ValueOrField<std::string>>(); + socktype->geometry_nodes_cpp_type = &blender::CPPType::get<ValueOrField<std::string>>(); socktype->get_geometry_nodes_cpp_value = [](const bNodeSocket &socket, void *r_value) { std::string value; value.~basic_string(); @@ -778,16 +778,16 @@ static bNodeSocketType *make_socket_type_string() return socktype; } -MAKE_CPP_TYPE(Object, Object *, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(Collection, Collection *, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(Texture, Tex *, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(Image, Image *, CPPTypeFlags::BasicType) -MAKE_CPP_TYPE(Material, Material *, CPPTypeFlags::BasicType) +BLI_CPP_TYPE_MAKE(Object, Object *, CPPTypeFlags::BasicType) +BLI_CPP_TYPE_MAKE(Collection, Collection *, CPPTypeFlags::BasicType) +BLI_CPP_TYPE_MAKE(Texture, Tex *, CPPTypeFlags::BasicType) +BLI_CPP_TYPE_MAKE(Image, Image *, CPPTypeFlags::BasicType) +BLI_CPP_TYPE_MAKE(Material, Material *, CPPTypeFlags::BasicType) static bNodeSocketType *make_socket_type_object() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_OBJECT, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<Object *>(); + socktype->base_cpp_type = &blender::CPPType::get<Object *>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(Object **)r_value = ((bNodeSocketValueObject *)socket.default_value)->value; }; @@ -799,7 +799,7 @@ static bNodeSocketType *make_socket_type_object() static bNodeSocketType *make_socket_type_geometry() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_GEOMETRY, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<GeometrySet>(); + socktype->base_cpp_type = &blender::CPPType::get<GeometrySet>(); socktype->get_base_cpp_value = [](const bNodeSocket &UNUSED(socket), void *r_value) { new (r_value) GeometrySet(); }; @@ -811,7 +811,7 @@ static bNodeSocketType *make_socket_type_geometry() static bNodeSocketType *make_socket_type_collection() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_COLLECTION, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<Collection *>(); + socktype->base_cpp_type = &blender::CPPType::get<Collection *>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(Collection **)r_value = ((bNodeSocketValueCollection *)socket.default_value)->value; }; @@ -823,7 +823,7 @@ static bNodeSocketType *make_socket_type_collection() static bNodeSocketType *make_socket_type_texture() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_TEXTURE, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<Tex *>(); + socktype->base_cpp_type = &blender::CPPType::get<Tex *>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(Tex **)r_value = ((bNodeSocketValueTexture *)socket.default_value)->value; }; @@ -835,7 +835,7 @@ static bNodeSocketType *make_socket_type_texture() static bNodeSocketType *make_socket_type_image() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_IMAGE, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<Image *>(); + socktype->base_cpp_type = &blender::CPPType::get<Image *>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(Image **)r_value = ((bNodeSocketValueImage *)socket.default_value)->value; }; @@ -847,7 +847,7 @@ static bNodeSocketType *make_socket_type_image() static bNodeSocketType *make_socket_type_material() { bNodeSocketType *socktype = make_standard_socket_type(SOCK_MATERIAL, PROP_NONE); - socktype->base_cpp_type = &blender::fn::CPPType::get<Material *>(); + socktype->base_cpp_type = &blender::CPPType::get<Material *>(); socktype->get_base_cpp_value = [](const bNodeSocket &socket, void *r_value) { *(Material **)r_value = ((bNodeSocketValueMaterial *)socket.default_value)->value; }; |