Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/function/nodes/node_fn_input_int.cc
| Show All 15 Lines | |||||
| #include "node_function_util.hh" | #include "node_function_util.hh" | ||||
| #include "BLI_hash.h" | #include "BLI_hash.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| namespace blender::nodes { | namespace blender::nodes::node_fn_input_int_cc { | ||||
| static void fn_node_input_int_declare(NodeDeclarationBuilder &b) | static void fn_node_input_int_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_output<decl::Int>(N_("Integer")); | b.add_output<decl::Int>(N_("Integer")); | ||||
| }; | }; | ||||
| static void fn_node_input_int_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void fn_node_input_int_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | ||||
| { | { | ||||
| Show All 9 Lines | |||||
| } | } | ||||
| static void fn_node_input_int_init(bNodeTree *UNUSED(ntree), bNode *node) | static void fn_node_input_int_init(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeInputInt *data = MEM_cnew<NodeInputInt>(__func__); | NodeInputInt *data = MEM_cnew<NodeInputInt>(__func__); | ||||
| node->storage = data; | node->storage = data; | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_fn_input_int_cc | ||||
| void register_node_type_fn_input_int() | void register_node_type_fn_input_int() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_fn_input_int_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| fn_node_type_base(&ntype, FN_NODE_INPUT_INT, "Integer", 0, 0); | fn_node_type_base(&ntype, FN_NODE_INPUT_INT, "Integer", 0); | ||||
| ntype.declare = blender::nodes::fn_node_input_int_declare; | ntype.declare = file_ns::fn_node_input_int_declare; | ||||
| node_type_init(&ntype, blender::nodes::fn_node_input_int_init); | node_type_init(&ntype, file_ns::fn_node_input_int_init); | ||||
| node_type_storage( | node_type_storage( | ||||
| &ntype, "NodeInputInt", node_free_standard_storage, node_copy_standard_storage); | &ntype, "NodeInputInt", node_free_standard_storage, node_copy_standard_storage); | ||||
| ntype.build_multi_function = blender::nodes::fn_node_input_int_build_multi_function; | ntype.build_multi_function = file_ns::fn_node_input_int_build_multi_function; | ||||
| ntype.draw_buttons = blender::nodes::fn_node_input_int_layout; | ntype.draw_buttons = file_ns::fn_node_input_int_layout; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||