diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2021-10-24 15:31:22 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2021-10-24 15:31:22 +0300 |
commit | 1aa953bd1913c81b22c80a00edbf4ad88a32c52f (patch) | |
tree | 7fa65e43d5a9bac6496555b723f37e0031e2737e /source/blender/nodes/function/nodes/node_fn_input_string.cc | |
parent | fc171c1be9da36485e892339b86dc8d4251914af (diff) | |
parent | 6ce383a9dfba5c49a48676c3a651804fde3dfe34 (diff) |
Merge branch 'master' into soc-2020-io-performance
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); } |