Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc
| Show All 17 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_align_euler_to_vector_cc { | ||||
| static void fn_node_align_euler_to_vector_declare(NodeDeclarationBuilder &b) | static void fn_node_align_euler_to_vector_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).hide_value(); | b.add_input<decl::Vector>(N_("Rotation")).subtype(PROP_EULER).hide_value(); | ||||
| b.add_input<decl::Float>(N_("Factor")) | b.add_input<decl::Float>(N_("Factor")) | ||||
| .default_value(1.0f) | .default_value(1.0f) | ||||
| .min(0.0f) | .min(0.0f) | ||||
| ▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | |||||
| }; | }; | ||||
| static void fn_node_align_euler_to_vector_build_multi_function(NodeMultiFunctionBuilder &builder) | static void fn_node_align_euler_to_vector_build_multi_function(NodeMultiFunctionBuilder &builder) | ||||
| { | { | ||||
| bNode &node = builder.node(); | bNode &node = builder.node(); | ||||
| builder.construct_and_set_matching_fn<MF_AlignEulerToVector>(node.custom1, node.custom2); | builder.construct_and_set_matching_fn<MF_AlignEulerToVector>(node.custom1, node.custom2); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_fn_align_euler_to_vector_cc | ||||
| void register_node_type_fn_align_euler_to_vector() | void register_node_type_fn_align_euler_to_vector() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_fn_align_euler_to_vector_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| fn_node_type_base( | fn_node_type_base( | ||||
| &ntype, FN_NODE_ALIGN_EULER_TO_VECTOR, "Align Euler to Vector", NODE_CLASS_CONVERTER, 0); | &ntype, FN_NODE_ALIGN_EULER_TO_VECTOR, "Align Euler to Vector", NODE_CLASS_CONVERTER); | ||||
| ntype.declare = blender::nodes::fn_node_align_euler_to_vector_declare; | ntype.declare = file_ns::fn_node_align_euler_to_vector_declare; | ||||
| ntype.draw_buttons = blender::nodes::fn_node_align_euler_to_vector_layout; | ntype.draw_buttons = file_ns::fn_node_align_euler_to_vector_layout; | ||||
| ntype.build_multi_function = blender::nodes::fn_node_align_euler_to_vector_build_multi_function; | ntype.build_multi_function = file_ns::fn_node_align_euler_to_vector_build_multi_function; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||