Blender V4.3
node_fn_invert_rotation.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
8
10
12{
13 b.is_function_node();
14 b.add_input<decl::Rotation>("Rotation");
15 b.add_output<decl::Rotation>("Rotation");
16};
17
19{
20 static auto fn = mf::build::SI1_SO<math::Quaternion, math::Quaternion>(
21 "Invert Quaternion", [](math::Quaternion quat) { return math::invert(quat); });
22 builder.set_matching_fn(fn);
23}
24
25static void node_register()
26{
27 static blender::bke::bNodeType ntype;
28 fn_node_type_base(&ntype, FN_NODE_INVERT_ROTATION, "Invert Rotation", NODE_CLASS_CONVERTER);
29 ntype.declare = node_declare;
32}
34
35} // namespace blender::nodes::node_fn_invert_rotation_cc
#define NODE_CLASS_CONVERTER
Definition BKE_node.hh:410
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void set_matching_fn(const mf::MultiFunction *fn)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
Definition node.cc:1708
CartesianBasis invert(const CartesianBasis &basis)
static void node_declare(NodeDeclarationBuilder &b)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
void fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition BKE_node.hh:218
NodeMultiFunctionBuildFunction build_multi_function
Definition BKE_node.hh:336
NodeDeclareFunction declare
Definition BKE_node.hh:347