29 b.add_input<
decl::Bool>(
"Boolean"_ustr,
"Boolean"_ustr);
32 if (
node !=
nullptr) {
35 b.add_input<
decl::Bool>(
"Boolean"_ustr,
"Boolean_001"_ustr);
69 if (item->name !=
nullptr && item->identifier[0] !=
'\0') {
72 bNode &node = params.add_node(
"FunctionNodeBooleanMath"_ustr);
73 node.custom1 = operation;
74 params.update_and_connect_available_socket(node,
"Boolean"_ustr);
147 return "boolean_math_and";
149 return "boolean_math_or";
151 return "boolean_math_not";
153 return "boolean_math_nand";
155 return "boolean_math_nor";
157 return "boolean_math_xnor";
159 return "boolean_math_xor";
161 return "boolean_math_imply";
163 return "boolean_math_nimply";
178 if (name ==
nullptr) {
188 const UString first_input_id =
"Boolean"_ustr;
189 const UString output_id =
"Boolean"_ustr;
216 ntype.
ui_name =
"Boolean Math";
217 ntype.
ui_description =
"Perform a logical operation on the given boolean inputs";
#define NODE_CLASS_CONVERTER
#define FN_NODE_BOOLEAN_MATH
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
#define BLI_assert_unreachable()
void add_item(std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
const bNodeTree & node_tree() const
const bNodeSocket & other_socket() const
void set_matching_fn(const mf::MultiFunction *fn)
T get_output(const UString identifier) const
void set_input(const UString identifier, T value)
T get_input_elem(const UString identifier) const
void set_output_elem(const UString identifier, T elem)
T get_output_elem(const UString identifier) const
void set_input_elem(const UString identifier, T elem)
void node_register_type(bNodeType &ntype)
const MultiFunction & lookup(UString id)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
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_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 const char * gpu_shader_get_name(const NodeBooleanMathOperation operation)
static void node_eval_elem(value_elem::ElemEvalParams ¶ms)
static void node_register()
static int node_gpu_material(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
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)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
@ NODE_BOOLEAN_MATH_NIMPLY
@ NODE_BOOLEAN_MATH_IMPLY
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
const EnumPropertyItem rna_enum_node_boolean_math_items[]
void common_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
bke::bNodeTreeType * typeinfo
bool(*) validate_link(eNodeSocketDatatype from, eNodeSocketDatatype to)
NodeInverseElemEvalFunction eval_inverse_elem
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
NodeInverseEvalFunction eval_inverse
std::string ui_description
void(*) labelfunc(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
NodeGPUExecFunction gpu_fn
NodeElemEvalFunction eval_elem
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)