Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_template_attribute_search.cc')
-rw-r--r--source/blender/editors/interface/interface_template_attribute_search.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_template_attribute_search.cc b/source/blender/editors/interface/interface_template_attribute_search.cc
index dc8f568d025..0a684903f0f 100644
--- a/source/blender/editors/interface/interface_template_attribute_search.cc
+++ b/source/blender/editors/interface/interface_template_attribute_search.cc
@@ -24,14 +24,14 @@ using blender::nodes::geometry_nodes_eval_log::GeometryAttributeInfo;
namespace blender::ui {
-static StringRef attribute_data_type_string(const CustomDataType type)
+static StringRef attribute_data_type_string(const eCustomDataType type)
{
const char *name = nullptr;
RNA_enum_name_from_value(rna_enum_attribute_type_items, type, &name);
return StringRef(IFACE_(name));
}
-static StringRef attribute_domain_string(const AttributeDomain domain)
+static StringRef attribute_domain_string(const eAttrDomain domain)
{
const char *name = nullptr;
RNA_enum_name_from_value(rna_enum_attribute_domain_items, domain, &name);
@@ -50,7 +50,7 @@ static bool attribute_search_item_add(uiSearchItems *items, const GeometryAttrib
}
void attribute_search_add_items(StringRefNull str,
- const bool is_output,
+ const bool can_create_attribute,
Span<const GeometryAttributeInfo *> infos,
uiSearchItems *seach_items,
const bool is_first)
@@ -68,8 +68,12 @@ void attribute_search_add_items(StringRefNull str,
}
if (!contained) {
dummy_info.name = str;
- UI_search_item_add(
- seach_items, str.c_str(), &dummy_info, is_output ? ICON_ADD : ICON_NONE, 0, 0);
+ UI_search_item_add(seach_items,
+ str.c_str(),
+ &dummy_info,
+ can_create_attribute ? ICON_ADD : ICON_NONE,
+ 0,
+ 0);
}
}
@@ -91,6 +95,9 @@ void attribute_search_add_items(StringRefNull str,
if (item->name == "normal" && item->domain == ATTR_DOMAIN_FACE) {
continue;
}
+ if (!bke::allow_procedural_attribute_access(item->name)) {
+ continue;
+ }
BLI_string_search_add(search, item->name.c_str(), (void *)item, 0);
}