22 const bNode *node =
b.node_or_null();
26 if (node !=
nullptr) {
29 b.add_output(data_type,
"Attribute").field_source();
59 node_storage(node).data_type = *type;
60 params.update_and_connect_available_socket(node,
"Attribute");
62 if (
params.node_tree().typeinfo->validate_link(
69 params.update_and_connect_available_socket(node,
"Exists");
82 std::string
name =
params.extract_input<std::string>(
"Name");
85 params.set_default_remaining_outputs();
90 params.set_default_remaining_outputs();
95 TIP_(
"Anonymous attributes cannot be accessed by name"));
96 params.set_default_remaining_outputs();
100 params.used_named_attribute(
name, NamedAttributeUsage::Read);
113 "The data type used to read the attribute values",
125 ntype.
ui_name =
"Named Attribute";
126 ntype.
ui_description =
"Retrieve the data of a specified attribute";
135 "NodeGeometryInputNamedAttribute",
#define NODE_STORAGE_FUNCS(StorageT)
#define GEO_NODE_INPUT_NAMED_ATTRIBUTE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
BMesh const char void * data
Vector< SocketDeclaration * > inputs
void * MEM_callocN(size_t len, const char *str)
bool attribute_name_is_anonymous(const StringRef name)
bool allow_procedural_attribute_access(StringRef attribute_name)
void node_register_type(bNodeType &ntype)
const char * no_procedural_access_message
const CPPType * custom_data_type_to_cpp_type(eCustomDataType type)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
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)
void search_link_ops_for_declarations(GatherLinkSearchOpParams ¶ms, Span< SocketDeclaration * > declarations)
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 geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
const EnumPropertyItem rna_enum_attribute_type_items[]
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)