27 const bNode *node =
b.node_or_null();
30 b.add_input(data_type,
"Value");
50 static auto exec_preset = mf::build::exec_presets::AllSpanOrSingle();
52 static auto fn_hash_float = mf::build::SI2_SO<float, int, int>(
56 static auto fn_hash_vector = mf::build::SI2_SO<float3, int, int>(
60 static auto fn_hash_color = mf::build::SI2_SO<ColorGeometry4f, int, int>(
64 static auto fn_hash_int = mf::build::SI2_SO<int, int, int>(
68 static auto fn_hash_string = mf::build::SI2_SO<std::string, int, int>(
72 static auto fn_hash_rotation = mf::build::SI2_SO<math::Quaternion, int, int>(
76 static auto fn_hash_matrix = mf::build::SI2_SO<float4x4, int, int>(
81 switch (socket_type) {
83 return &fn_hash_matrix;
85 return &fn_hash_rotation;
87 return &fn_hash_string;
89 return &fn_hash_float;
91 return &fn_hash_vector;
93 return &fn_hash_color;
108 bNode &node =
params.add_node(
"FunctionNodeHashValue");
123 if (!
ELEM(socket_type,
#define NODE_CLASS_CONVERTER
#define BLI_assert_unreachable()
BLI_INLINE unsigned int BLI_hash_string(const char *str)
#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)
static unsigned long seed
void set_matching_fn(const mf::MultiFunction *fn)
eNodeSocketDatatype socket_type
const StringRef socket_name
void operator()(LinkSearchOpParams ¶ms)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static const mf::MultiFunction * get_multi_function(const bNode &bnode)
static void node_build_multi_function(NodeMultiFunctionBuilder &builder)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
static void node_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_rna(StructRNA *srna)
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)
const EnumPropertyItem * enum_items_filter(const EnumPropertyItem *original_item_array, FunctionRef< bool(const EnumPropertyItem &item)> fn)
uint32_t hash_float(float kx)
uint32_t hash(uint32_t kx)
VecBase< float, 4 > float4
void fn_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
const EnumPropertyItem rna_enum_node_socket_data_type_items[]
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeMultiFunctionBuildFunction build_multi_function
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare