Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/function/nodes/node_fn_boolean_math.cc
| Show All 18 Lines | |||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "node_function_util.hh" | #include "node_function_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes::node_fn_boolean_math_cc { | ||||
| static void fn_node_boolean_math_declare(NodeDeclarationBuilder &b) | static void fn_node_boolean_math_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Bool>(N_("Boolean"), "Boolean"); | b.add_input<decl::Bool>(N_("Boolean"), "Boolean"); | ||||
| b.add_input<decl::Bool>(N_("Boolean"), "Boolean_001"); | b.add_input<decl::Bool>(N_("Boolean"), "Boolean_001"); | ||||
| b.add_output<decl::Bool>(N_("Boolean")); | b.add_output<decl::Bool>(N_("Boolean")); | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void fn_node_boolean_math_build_multi_function(NodeMultiFunctionBuilder &builder) | static void fn_node_boolean_math_build_multi_function(NodeMultiFunctionBuilder &builder) | ||||
| { | { | ||||
| const fn::MultiFunction *fn = get_multi_function(builder.node()); | const fn::MultiFunction *fn = get_multi_function(builder.node()); | ||||
| builder.set_matching_fn(fn); | builder.set_matching_fn(fn); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_fn_boolean_math_cc | ||||
| void register_node_type_fn_boolean_math() | void register_node_type_fn_boolean_math() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_fn_boolean_math_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| fn_node_type_base(&ntype, FN_NODE_BOOLEAN_MATH, "Boolean Math", NODE_CLASS_CONVERTER, 0); | fn_node_type_base(&ntype, FN_NODE_BOOLEAN_MATH, "Boolean Math", NODE_CLASS_CONVERTER); | ||||
| ntype.declare = blender::nodes::fn_node_boolean_math_declare; | ntype.declare = file_ns::fn_node_boolean_math_declare; | ||||
| ntype.labelfunc = blender::nodes::node_boolean_math_label; | ntype.labelfunc = file_ns::node_boolean_math_label; | ||||
| node_type_update(&ntype, blender::nodes::node_boolean_math_update); | node_type_update(&ntype, file_ns::node_boolean_math_update); | ||||
| ntype.build_multi_function = blender::nodes::fn_node_boolean_math_build_multi_function; | ntype.build_multi_function = file_ns::fn_node_boolean_math_build_multi_function; | ||||
| ntype.draw_buttons = blender::nodes::fn_node_boolean_math_layout; | ntype.draw_buttons = file_ns::fn_node_boolean_math_layout; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||