13 b.use_custom_socket_order();
14 b.allow_any_socket_order();
18 .description(
"The inverted matrix or the identity matrix if the input is not invertible")
19 .align_with_previous();
20 b.add_output<
decl::Bool>(
"Invertible").description(
"True if the input matrix is invertible");
29 mf::SignatureBuilder builder{
"Invert Matrix",
signature};
30 builder.single_input<
float4x4>(
"Matrix");
31 builder.single_output<
float4x4>(
"Matrix", mf::ParamFlag::SupportsUnusedOutput);
32 builder.single_output<
bool>(
"Invertible", mf::ParamFlag::SupportsUnusedOutput);
49 if (!out_matrices.is_empty()) {
52 if (!out_invertible.is_empty()) {
53 out_invertible[
i] = success;
69 ntype.
ui_name =
"Invert Matrix";
70 ntype.
ui_description =
"Compute the inverse of the given matrix, if one exists";
#define NODE_CLASS_CONVERTER
#define FN_NODE_INVERT_MATRIX
#define NOD_REGISTER_NODE(REGISTER_FUNC)
const Signature & signature() const
void set_signature(const Signature *signature)
void set_matching_fn(const mf::MultiFunction *fn)
void call(const IndexMask &mask, mf::Params params, mf::Context) const override
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
void node_register_type(bNodeType &ntype)
CartesianBasis invert(const CartesianBasis &basis)
static void node_declare(NodeDeclarationBuilder &b)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_register()
MatBase< float, 4, 4 > float4x4
void fn_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
static MatBase identity()
std::string ui_description
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeDeclareFunction declare