diff options
Diffstat (limited to 'source/blender/nodes/function/nodes/node_fn_input_string.cc')
-rw-r--r-- | source/blender/nodes/function/nodes/node_fn_input_string.cc | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/nodes/function/nodes/node_fn_input_string.cc b/source/blender/nodes/function/nodes/node_fn_input_string.cc index 704ae9d900c..0982096eaea 100644 --- a/source/blender/nodes/function/nodes/node_fn_input_string.cc +++ b/source/blender/nodes/function/nodes/node_fn_input_string.cc @@ -27,21 +27,17 @@ static void fn_node_input_string_declare(NodeDeclarationBuilder &b) b.add_output<decl::String>("String"); }; -} // namespace blender::nodes - static void fn_node_input_string_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiItemR(layout, ptr, "string", 0, "", ICON_NONE); } -static void fn_node_input_string_build_multi_function( - blender::nodes::NodeMultiFunctionBuilder &builder) +static void fn_node_input_string_build_multi_function(NodeMultiFunctionBuilder &builder) { bNode &bnode = builder.node(); NodeInputString *node_storage = static_cast<NodeInputString *>(bnode.storage); std::string string = std::string((node_storage->string) ? node_storage->string : ""); - builder.construct_and_set_matching_fn<blender::fn::CustomMF_Constant<std::string>>( - std::move(string)); + builder.construct_and_set_matching_fn<fn::CustomMF_Constant<std::string>>(std::move(string)); } static void fn_node_input_string_init(bNodeTree *UNUSED(ntree), bNode *node) @@ -75,15 +71,20 @@ static void fn_node_string_copy(bNodeTree *UNUSED(dest_ntree), dest_node->storage = destination_storage; } +} // namespace blender::nodes + void register_node_type_fn_input_string() { static bNodeType ntype; fn_node_type_base(&ntype, FN_NODE_INPUT_STRING, "String", NODE_CLASS_INPUT, 0); ntype.declare = blender::nodes::fn_node_input_string_declare; - node_type_init(&ntype, fn_node_input_string_init); - node_type_storage(&ntype, "NodeInputString", fn_node_input_string_free, fn_node_string_copy); - ntype.build_multi_function = fn_node_input_string_build_multi_function; - ntype.draw_buttons = fn_node_input_string_layout; + node_type_init(&ntype, blender::nodes::fn_node_input_string_init); + node_type_storage(&ntype, + "NodeInputString", + blender::nodes::fn_node_input_string_free, + blender::nodes::fn_node_string_copy); + ntype.build_multi_function = blender::nodes::fn_node_input_string_build_multi_function; + ntype.draw_buttons = blender::nodes::fn_node_input_string_layout; nodeRegisterType(&ntype); } |