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:
authorHans Goudey <h.goudey@me.com>2021-10-21 21:54:48 +0300
committerHans Goudey <h.goudey@me.com>2021-10-21 21:54:48 +0300
commit1d96a482675dd2ccad2af31c274f74b9f6603d6b (patch)
treebeb0406f7a9f1e6b826cc590eeab69e361a83b3b /source/blender/editors/include
parent65490e62708c6bb0c03d9c73fd7179fdf71355a5 (diff)
Geometry Nodes: Attribute search in the modifier
This adds attribute search to the geometry nodes modifier for the input and output attributes. The "New" search item is only shown for the output attributes. Some of the attribute search code is extracted to a new file in the interface code, to avoid some code duplication. The UI code required two fixes so that the search would work for dynamic length strings (IDProperties do not have a fixed size). Since this does changes to the UI layout of the modifier, I also addressed T91485 here. Differential Revisiion: https://developer.blender.org/D12788
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.hh b/source/blender/editors/include/UI_interface.hh
index 4a583d0225e..5edccfa8c88 100644
--- a/source/blender/editors/include/UI_interface.hh
+++ b/source/blender/editors/include/UI_interface.hh
@@ -24,10 +24,22 @@
#include "BLI_string_ref.hh"
+namespace blender::nodes::geometry_nodes_eval_log {
+struct GeometryAttributeInfo;
+}
+
struct uiBlock;
namespace blender::ui {
class AbstractTreeView;
-}
+
+void attribute_search_add_items(
+ StringRefNull str,
+ const bool is_output,
+ Span<const nodes::geometry_nodes_eval_log::GeometryAttributeInfo *> infos,
+ uiSearchItems *items,
+ const bool is_first);
+
+} // namespace blender::ui
blender::ui::AbstractTreeView *UI_block_add_view(
uiBlock &block,