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:
authorJacques Lucke <jacques@blender.org>2021-03-17 13:15:39 +0300
committerJacques Lucke <jacques@blender.org>2021-03-17 13:15:39 +0300
commite00a47ffd611b0ab06dba2a4933ab15871d576e6 (patch)
treed7f17f17ddae14e943b1f10cc1a0c3e9aab847ae /source/blender/editors/space_node/node_geometry_attribute_search.cc
parente91dd645a94d63c62c8a63d0da0ba145f48da289 (diff)
Geometry Nodes: store domain and data type in attribute hints
The information is not exposed in the attribute search yet.
Diffstat (limited to 'source/blender/editors/space_node/node_geometry_attribute_search.cc')
-rw-r--r--source/blender/editors/space_node/node_geometry_attribute_search.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_geometry_attribute_search.cc b/source/blender/editors/space_node/node_geometry_attribute_search.cc
index b03346577a8..6d0cd254505 100644
--- a/source/blender/editors/space_node/node_geometry_attribute_search.cc
+++ b/source/blender/editors/space_node/node_geometry_attribute_search.cc
@@ -37,6 +37,7 @@
using blender::IndexRange;
using blender::Map;
+using blender::MultiValueMap;
using blender::Set;
using blender::StringRef;
@@ -62,9 +63,10 @@ static void attribute_search_update_fn(
return;
}
- const Set<std::string> &attribute_name_hints = ui_storage->attribute_name_hints;
+ const MultiValueMap<std::string, AvailableAttributeInfo> &attribute_hints =
+ ui_storage->attribute_hints;
- if (str[0] != '\0' && !attribute_name_hints.contains_as(StringRef(str))) {
+ if (str[0] != '\0' && attribute_hints.lookup_as(StringRef(str)).is_empty()) {
/* Any string may be valid, so add the current search string with the hints. */
UI_search_item_add(items, str, (void *)str, ICON_ADD, 0, 0);
}
@@ -80,7 +82,7 @@ static void attribute_search_update_fn(
const char *string = is_first ? "" : str;
StringSearch *search = BLI_string_search_new();
- for (const std::string &attribute_name : attribute_name_hints) {
+ for (const std::string &attribute_name : attribute_hints.keys()) {
BLI_string_search_add(search, attribute_name.c_str(), (void *)&attribute_name);
}