Cleanup: Use new socket builder API
This commit is contained in:
parent
9620fdc986
commit
ed1ced2484
|
@ -25,19 +25,15 @@
|
|||
|
||||
namespace blender::nodes::node_shader_hueSatVal_cc {
|
||||
|
||||
/* **************** Hue Saturation ******************** */
|
||||
static bNodeSocketTemplate sh_node_hue_sat_in[] = {
|
||||
{SOCK_FLOAT, N_("Hue"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
|
||||
{SOCK_FLOAT, N_("Saturation"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_NONE},
|
||||
{SOCK_FLOAT, N_("Value"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_NONE},
|
||||
{SOCK_FLOAT, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
|
||||
{SOCK_RGBA, N_("Color"), 0.8f, 0.8f, 0.8f, 1.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
static bNodeSocketTemplate sh_node_hue_sat_out[] = {
|
||||
{SOCK_RGBA, N_("Color")},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Hue")).default_value(0.5f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Float>(N_("Saturation")).default_value(1.0f).min(0.0f).max(2.0f);
|
||||
b.add_input<decl::Float>(N_("Value")).default_value(1.0f).min(0.0f).max(2.0f);
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.8f, 0.8f, 0.8f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
}
|
||||
|
||||
static int gpu_shader_hue_sat(GPUMaterial *mat,
|
||||
bNode *node,
|
||||
|
@ -57,7 +53,7 @@ void register_node_type_sh_hue_sat()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR);
|
||||
node_type_socket_templates(&ntype, file_ns::sh_node_hue_sat_in, file_ns::sh_node_hue_sat_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_gpu(&ntype, file_ns::gpu_shader_hue_sat);
|
||||
|
||||
|
|
|
@ -21,18 +21,12 @@
|
|||
|
||||
namespace blender::nodes::node_shader_ies_light_cc {
|
||||
|
||||
/* **************** IES Light ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_ies_in[] = {
|
||||
{SOCK_VECTOR, N_("Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
|
||||
{SOCK_FLOAT, N_("Strength"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f, PROP_NONE},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_ies_out[] = {
|
||||
{SOCK_FLOAT, N_("Fac")},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(1.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_output<decl::Float>(N_("Fac"));
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_ies(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
|
@ -50,7 +44,7 @@ void register_node_type_sh_tex_ies()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_TEX_IES, "IES Texture", NODE_CLASS_TEXTURE);
|
||||
node_type_socket_templates(&ntype, file_ns::sh_node_tex_ies_in, file_ns::sh_node_tex_ies_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_init(&ntype, file_ns::node_shader_init_tex_ies);
|
||||
node_type_storage(
|
||||
&ntype, "NodeShaderTexIES", node_free_standard_storage, node_copy_standard_storage);
|
||||
|
|
|
@ -25,13 +25,12 @@
|
|||
|
||||
namespace blender::nodes::node_shader_invert_cc {
|
||||
|
||||
/* **************** INVERT ******************** */
|
||||
static bNodeSocketTemplate sh_node_invert_in[] = {
|
||||
{SOCK_FLOAT, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
|
||||
{SOCK_RGBA, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{-1, ""}};
|
||||
|
||||
static bNodeSocketTemplate sh_node_invert_out[] = {{SOCK_RGBA, N_("Color")}, {-1, ""}};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
}
|
||||
|
||||
static int gpu_shader_invert(GPUMaterial *mat,
|
||||
bNode *node,
|
||||
|
@ -51,7 +50,7 @@ void register_node_type_sh_invert()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR);
|
||||
node_type_socket_templates(&ntype, file_ns::sh_node_invert_in, file_ns::sh_node_invert_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_gpu(&ntype, file_ns::gpu_shader_invert);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
|
|
@ -21,19 +21,13 @@
|
|||
|
||||
namespace blender::nodes::node_shader_layer_weight_cc {
|
||||
|
||||
/* **************** Layer Weight ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_layer_weight_in[] = {
|
||||
{SOCK_FLOAT, N_("Blend"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("Normal"), 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_layer_weight_out[] = {
|
||||
{SOCK_FLOAT, N_("Fresnel"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_FLOAT, N_("Facing"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Blend")).default_value(0.5f).min(0.0f).max(1.0f);
|
||||
b.add_input<decl::Vector>(N_("Normal")).hide_value();
|
||||
b.add_output<decl::Float>(N_("Fresnel"));
|
||||
b.add_output<decl::Float>(N_("Facing"));
|
||||
}
|
||||
|
||||
static int node_shader_gpu_layer_weight(GPUMaterial *mat,
|
||||
bNode *node,
|
||||
|
@ -62,8 +56,7 @@ void register_node_type_sh_layer_weight()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_LAYER_WEIGHT, "Layer Weight", NODE_CLASS_INPUT);
|
||||
node_type_socket_templates(
|
||||
&ntype, file_ns::sh_node_layer_weight_in, file_ns::sh_node_layer_weight_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_gpu(&ntype, file_ns::node_shader_gpu_layer_weight);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
|
|
@ -21,22 +21,14 @@
|
|||
|
||||
namespace blender::nodes::node_shader_light_falloff_cc {
|
||||
|
||||
/* **************** INPUT ********************* */
|
||||
|
||||
static bNodeSocketTemplate sh_node_light_falloff_in[] = {
|
||||
{SOCK_FLOAT, N_("Strength"), 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000000.0f},
|
||||
{SOCK_FLOAT, N_("Smooth"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
/* **************** OUTPUT ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_light_falloff_out[] = {
|
||||
{SOCK_FLOAT, N_("Quadratic"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_FLOAT, N_("Linear"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_FLOAT, N_("Constant"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(100.0f).min(0.0f).max(1000000.0f);
|
||||
b.add_input<decl::Float>(N_("Smooth")).default_value(0.0f).min(0.0f).max(1000.0f);
|
||||
b.add_output<decl::Float>(N_("Quadratic"));
|
||||
b.add_output<decl::Float>(N_("Linear"));
|
||||
b.add_output<decl::Float>(N_("Constant"));
|
||||
}
|
||||
|
||||
static int node_shader_gpu_light_falloff(GPUMaterial *mat,
|
||||
bNode *node,
|
||||
|
@ -57,8 +49,7 @@ void register_node_type_sh_light_falloff()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_LIGHT_FALLOFF, "Light Falloff", NODE_CLASS_OP_COLOR);
|
||||
node_type_socket_templates(
|
||||
&ntype, file_ns::sh_node_light_falloff_in, file_ns::sh_node_light_falloff_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_gpu(&ntype, file_ns::node_shader_gpu_light_falloff);
|
||||
|
||||
|
|
|
@ -25,19 +25,29 @@
|
|||
|
||||
namespace blender::nodes::node_shader_mapping_cc {
|
||||
|
||||
/* **************** MAPPING ******************** */
|
||||
static bNodeSocketTemplate sh_node_mapping_in[] = {
|
||||
{SOCK_VECTOR, N_("Vector"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_NONE},
|
||||
{SOCK_VECTOR, N_("Location"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_TRANSLATION},
|
||||
{SOCK_VECTOR, N_("Rotation"), 0.0f, 0.0f, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_EULER},
|
||||
{SOCK_VECTOR, N_("Scale"), 1.0f, 1.0f, 1.0f, 1.0f, -FLT_MAX, FLT_MAX, PROP_XYZ},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_mapping_out[] = {
|
||||
{SOCK_VECTOR, N_("Vector")},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector"))
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX);
|
||||
b.add_input<decl::Vector>(N_("Location"))
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_TRANSLATION);
|
||||
b.add_input<decl::Vector>(N_("Rotation"))
|
||||
.default_value({0.0f, 0.0f, 0.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_EULER);
|
||||
b.add_input<decl::Vector>(N_("Scale"))
|
||||
.default_value({1.0f, 1.0f, 1.0f})
|
||||
.min(-FLT_MAX)
|
||||
.max(FLT_MAX)
|
||||
.subtype(PROP_XYZ);
|
||||
b.add_output<decl::Vector>(N_("Vector"));
|
||||
}
|
||||
|
||||
static const char *gpu_shader_get_name(int mode)
|
||||
{
|
||||
|
@ -83,7 +93,7 @@ void register_node_type_sh_mapping()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR);
|
||||
node_type_socket_templates(&ntype, file_ns::sh_node_mapping_in, file_ns::sh_node_mapping_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_gpu(&ntype, file_ns::gpu_shader_mapping);
|
||||
node_type_update(&ntype, file_ns::node_shader_update_mapping);
|
||||
|
||||
|
|
|
@ -21,18 +21,12 @@
|
|||
|
||||
namespace blender::nodes::node_shader_normal_map_cc {
|
||||
|
||||
/* **************** OUTPUT ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_normal_map_in[] = {
|
||||
{SOCK_FLOAT, N_("Strength"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f},
|
||||
{SOCK_RGBA, N_("Color"), 0.5f, 0.5f, 1.0f, 1.0f, 0.0f, 1.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_normal_map_out[] = {
|
||||
{SOCK_VECTOR, N_("Normal"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Float>(N_("Strength")).default_value(1.0f).min(0.0f).max(10.0f);
|
||||
b.add_input<decl::Color>(N_("Color")).default_value({0.5f, 0.5f, 1.0f, 1.0f});
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
}
|
||||
|
||||
static void node_shader_init_normal_map(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
|
@ -118,8 +112,7 @@ void register_node_type_sh_normal_map()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_NORMAL_MAP, "Normal Map", NODE_CLASS_OP_VECTOR);
|
||||
node_type_socket_templates(
|
||||
&ntype, file_ns::sh_node_normal_map_in, file_ns::sh_node_normal_map_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_init(&ntype, file_ns::node_shader_init_normal_map);
|
||||
node_type_storage(
|
||||
|
|
|
@ -23,18 +23,16 @@
|
|||
|
||||
namespace blender::nodes::node_shader_tex_coord_cc {
|
||||
|
||||
/* **************** OUTPUT ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_coord_out[] = {
|
||||
{SOCK_VECTOR, N_("Generated"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("Normal"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("UV"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("Object"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("Camera"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("Window"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{SOCK_VECTOR, N_("Reflection"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_output<decl::Vector>(N_("Generated"));
|
||||
b.add_output<decl::Vector>(N_("Normal"));
|
||||
b.add_output<decl::Vector>(N_("UV"));
|
||||
b.add_output<decl::Vector>(N_("Object"));
|
||||
b.add_output<decl::Vector>(N_("Camera"));
|
||||
b.add_output<decl::Vector>(N_("Window"));
|
||||
b.add_output<decl::Vector>(N_("Reflection"));
|
||||
}
|
||||
|
||||
static int node_shader_gpu_tex_coord(GPUMaterial *mat,
|
||||
bNode *node,
|
||||
|
@ -95,7 +93,7 @@ void register_node_type_sh_tex_coord()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_TEX_COORD, "Texture Coordinate", NODE_CLASS_INPUT);
|
||||
node_type_socket_templates(&ntype, nullptr, file_ns::sh_node_tex_coord_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_coord);
|
||||
|
||||
nodeRegisterType(&ntype);
|
||||
|
|
|
@ -21,17 +21,11 @@
|
|||
|
||||
namespace blender::nodes::node_shader_tex_environment_cc {
|
||||
|
||||
/* **************** OUTPUT ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_environment_in[] = {
|
||||
{SOCK_VECTOR, N_("Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_environment_out[] = {
|
||||
{SOCK_RGBA, N_("Color"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_NO_INTERNAL_LINK},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_environment(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
|
@ -144,8 +138,7 @@ void register_node_type_sh_tex_environment()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE);
|
||||
node_type_socket_templates(
|
||||
&ntype, file_ns::sh_node_tex_environment_in, file_ns::sh_node_tex_environment_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_init(&ntype, file_ns::node_shader_init_tex_environment);
|
||||
node_type_storage(
|
||||
&ntype, "NodeTexEnvironment", node_free_standard_storage, node_copy_standard_storage);
|
||||
|
|
|
@ -23,18 +23,12 @@
|
|||
|
||||
namespace blender::nodes::node_shader_tex_pointdensity_cc {
|
||||
|
||||
/* **************** OUTPUT ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_pointdensity_in[] = {
|
||||
{SOCK_VECTOR, N_("Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_pointdensity_out[] = {
|
||||
{SOCK_RGBA, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
|
||||
{SOCK_FLOAT, N_("Density"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color"));
|
||||
b.add_output<decl::Float>(N_("Density"));
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_pointdensity(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
|
@ -76,8 +70,7 @@ void register_node_type_sh_tex_pointdensity()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_TEX_POINTDENSITY, "Point Density", NODE_CLASS_TEXTURE);
|
||||
node_type_socket_templates(
|
||||
&ntype, file_ns::sh_node_tex_pointdensity_in, file_ns::sh_node_tex_pointdensity_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_init(&ntype, file_ns::node_shader_init_tex_pointdensity);
|
||||
node_type_storage(&ntype,
|
||||
"NodeShaderTexPointDensity",
|
||||
|
|
|
@ -22,17 +22,11 @@
|
|||
|
||||
namespace blender::nodes::node_shader_tex_sky_cc {
|
||||
|
||||
/* **************** OUTPUT ******************** */
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_sky_in[] = {
|
||||
{SOCK_VECTOR, N_("Vector"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},
|
||||
{-1, ""},
|
||||
};
|
||||
|
||||
static bNodeSocketTemplate sh_node_tex_sky_out[] = {
|
||||
{SOCK_RGBA, N_("Color"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_NO_INTERNAL_LINK},
|
||||
{-1, ""},
|
||||
};
|
||||
static void node_declare(NodeDeclarationBuilder &b)
|
||||
{
|
||||
b.add_input<decl::Vector>(N_("Vector")).hide_value();
|
||||
b.add_output<decl::Color>(N_("Color")).no_muted_links();
|
||||
}
|
||||
|
||||
static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
|
@ -215,7 +209,7 @@ void register_node_type_sh_tex_sky()
|
|||
static bNodeType ntype;
|
||||
|
||||
sh_node_type_base(&ntype, SH_NODE_TEX_SKY, "Sky Texture", NODE_CLASS_TEXTURE);
|
||||
node_type_socket_templates(&ntype, file_ns::sh_node_tex_sky_in, file_ns::sh_node_tex_sky_out);
|
||||
ntype.declare = file_ns::node_declare;
|
||||
node_type_size_preset(&ntype, NODE_SIZE_MIDDLE);
|
||||
node_type_init(&ntype, file_ns::node_shader_init_tex_sky);
|
||||
node_type_storage(&ntype, "NodeTexSky", node_free_standard_storage, node_copy_standard_storage);
|
||||
|
|
Loading…
Reference in New Issue