20 b.use_custom_socket_order();
21 b.allow_any_socket_order();
22 b.add_default_layout();
24 if (
node !=
nullptr) {
26 b.add_input(data_type,
"Value"_ustr).hide_value().structure_type(StructureType::Field);
27 b.add_output(data_type,
"Value"_ustr)
28 .structure_type(StructureType::Field)
29 .propagate_references()
30 .align_with_previous();
32 b.add_input<
decl::Int>(
"Index"_ustr).
min(0).structure_type(StructureType::Field);
43 node->custom1 = int(AttrDomain::Point);
58 if (params.in_out() ==
SOCK_IN) {
88 "Domain the field is evaluated in",
91 int(AttrDomain::Point));
108 ntype.
ui_name =
"Evaluate at Index";
109 ntype.
ui_description =
"Retrieve data of other elements in the context's geometry";
#define NODE_CLASS_CONVERTER
#define GEO_NODE_EVALUATE_AT_INDEX
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_inline_enum_accessors(member)
static GField from_input(Args &&...args)
const bke::bNodeType & node_type() const
void add_item(std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
const bNodeSocket & other_socket() const
T extract_input(const UString identifier)
const bNode & node() const
void set_output(const UString identifier, T &&value)
void update_and_connect_available_socket(bNode &new_node, UString socket_name)
bNode & add_node(UString idname)
void node_register_type(bNodeType &ntype)
std::optional< eCustomDataType > socket_type_to_custom_data_type(eNodeSocketDatatype type)
const EnumPropertyItem * attribute_type_type_with_socket_fn(bContext *, PointerRNA *, PropertyRNA *, bool *r_free)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_init(bNodeTree *, bNode *node)
static void node_geo_exec(GeoNodeExecParams params)
static void node_gather_link_searches(GatherLinkSearchOpParams ¶ms)
static void node_rna(StructRNA *srna)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
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 rna_enum_attribute_type_items[]
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
const EnumPropertyItem rna_enum_attribute_domain_items[]
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
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)