27#include <fmt/format.h>
37 const char *name =
nullptr;
44 const char *name =
nullptr;
51 std::string search_item_text = fmt::format(
60 const bool can_create_attribute,
68 if (!
str.is_empty()) {
69 bool contained =
false;
71 if (attribute_info->name ==
str) {
79 search_items,
str, &dummy_info, can_create_attribute ? ICON_ADD : ICON_NONE, 0, 0);
83 if (
str.is_empty() && !is_first) {
99 search.
add(item->name, item);
void add(const StringRef str, T *user_data, const int weight=0)
Vector< T * > query(const StringRef query) const
std::optional< eCustomDataType > attr_type_to_custom_data_type(AttrType attr_type)
bool allow_procedural_attribute_access(StringRef attribute_name)
void attribute_search_add_items(StringRef str, bool can_create_attribute, Span< const nodes::eval_log::GeometryAttributeInfo * > infos, SearchItems *items, bool is_first)
static bool attribute_search_item_add(SearchItems *items, const GeometryAttributeInfo &item)
bool search_item_add(SearchItems *items, StringRef name, void *poin, int iconid, int64_t but_flag, uint8_t name_prefix_offset)
static StringRef attribute_domain_string(const bke::AttrDomain domain)
static StringRef attribute_data_type_string(const eCustomDataType type)
bool RNA_enum_name_from_value(const EnumPropertyItem *item, int value, const char **r_name)
const EnumPropertyItem rna_enum_attribute_type_items[]
const EnumPropertyItem rna_enum_attribute_domain_items[]
#define UI_MENU_ARROW_SEP
std::optional< bke::AttrType > data_type
std::optional< bke::AttrDomain > domain