59 if (!
params.node_tree().typeinfo->validate_link(
69 if (item->name !=
nullptr && item->identifier[0] !=
'\0') {
72 bNode &node =
params.add_node(
"FunctionNodeBooleanMath");
73 node.custom1 = operation;
74 params.update_and_connect_available_socket(node,
"Boolean");
82 static auto exec_preset = mf::build::exec_presets::AllSpanOrSingle();
83 static auto and_fn = mf::build::SI2_SO<bool, bool, bool>(
84 "And", [](
bool a,
bool b) {
return a &&
b; }, exec_preset);
85 static auto or_fn = mf::build::SI2_SO<bool, bool, bool>(
86 "Or", [](
bool a,
bool b) {
return a ||
b; }, exec_preset);
87 static auto not_fn = mf::build::SI1_SO<bool, bool>(
88 "Not", [](
bool a) {
return !a; }, exec_preset);
89 static auto nand_fn = mf::build::SI2_SO<bool, bool, bool>(
90 "Not And", [](
bool a,
bool b) {
return !(a &&
b); }, exec_preset);
91 static auto nor_fn = mf::build::SI2_SO<bool, bool, bool>(
92 "Nor", [](
bool a,
bool b) {
return !(a ||
b); }, exec_preset);
93 static auto xnor_fn = mf::build::SI2_SO<bool, bool, bool>(
94 "Equal", [](
bool a,
bool b) {
return a ==
b; }, exec_preset);
95 static auto xor_fn = mf::build::SI2_SO<bool, bool, bool>(
96 "Not Equal", [](
bool a,
bool b) {
return a !=
b; }, exec_preset);
97 static auto imply_fn = mf::build::SI2_SO<bool, bool, bool>(
98 "Imply", [](
bool a,
bool b) {
return !a ||
b; }, exec_preset);
99 static auto nimply_fn = mf::build::SI2_SO<bool, bool, bool>(
100 "Subtract", [](
bool a,
bool b) {
return a && !
b; }, exec_preset);
135 using namespace value_elem;
139 params.set_output_elem(
"Boolean",
params.get_input_elem<BoolElem>(
"Boolean"));
150 using namespace value_elem;
154 params.set_input_elem(
"Boolean",
params.get_output_elem<BoolElem>(
"Boolean"));
166 const StringRef first_input_id =
"Boolean";
170 params.set_input(first_input_id, !
params.get_output<
bool>(output_id));
#define NODE_CLASS_CONVERTER
#define BLI_assert_unreachable()
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
@ NODE_BOOLEAN_MATH_IMPLY
@ NODE_BOOLEAN_MATH_NIMPLY
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
void set_matching_fn(const mf::MultiFunction *fn)
local_group_size(16, 16) .push_constant(Type b
void node_set_socket_availability(bNodeTree *ntree, bNodeSocket *sock, bool is_available)
void node_register_type(bNodeType *ntype)
static const mf::MultiFunction * get_multi_function(const bNode &bnode)
static void node_eval_inverse(inverse_eval::InverseEvalParams ¶ms)
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
static void node_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_eval_inverse_elem(value_elem::InverseElemEvalParams ¶ms)
static void node_declare(NodeDeclarationBuilder &b)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_rna(StructRNA *srna)
static void node_update(bNodeTree *ntree, bNode *node)
static void node_eval_elem(value_elem::ElemEvalParams ¶ms)
static void node_register()
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
void fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
const EnumPropertyItem rna_enum_node_boolean_math_items[]
NodeInverseElemEvalFunction eval_inverse_elem
NodeInverseEvalFunction eval_inverse
void(* labelfunc)(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
NodeElemEvalFunction eval_elem
NodeMultiFunctionBuildFunction build_multi_function
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
void(* updatefunc)(bNodeTree *ntree, bNode *node)