Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/function/nodes/node_fn_input_vector.cc')
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_vector.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/nodes/function/nodes/node_fn_input_vector.cc b/source/blender/nodes/function/nodes/node_fn_input_vector.cc
index 244c045de9a..9548df7b423 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_vector.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_vector.cc
@@ -21,11 +21,15 @@
#include "UI_interface.h"
#include "UI_resources.h"
-static bNodeSocketTemplate fn_node_input_vector_out[] = {
- {SOCK_VECTOR, N_("Vector")},
- {-1, ""},
+namespace blender::nodes {
+
+static void fn_node_input_vector_declare(NodeDeclarationBuilder &b)
+{
+ b.add_output<decl::Vector>("Vector");
};
+} // namespace blender::nodes
+
static void fn_node_input_vector_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col = uiLayoutColumn(layout, true);
@@ -52,7 +56,7 @@ void register_node_type_fn_input_vector()
static bNodeType ntype;
fn_node_type_base(&ntype, FN_NODE_INPUT_VECTOR, "Vector", 0, 0);
- node_type_socket_templates(&ntype, nullptr, fn_node_input_vector_out);
+ ntype.declare = blender::nodes::fn_node_input_vector_declare;
node_type_init(&ntype, fn_node_input_vector_init);
node_type_storage(
&ntype, "NodeInputVector", node_free_standard_storage, node_copy_standard_storage);