Description
Revisions and Commits
| rB Blender | |||
| D10519 | rB85421c4fab02 Geometry Nodes: Attribute search drop-down | ||
| D10527 | rBa344f2034679 UI: Rename search button variable | ||
| D10528 | rB1a8aee0a7cec UI: Expose an "is first search" boolean to search button callbacks | ||
Related Objects
- Mentioned In
- T85881: User interface improvements for attribute search
- Mentioned Here
- rB45f6c9bd0533: Attribute Search: Always add current value to the search list
T85280: Attribute search (dropdown) for polishing
T85656: Auto-completion sub-type for input "buttons" to support lookup + new value for Attribute search dropdown
T85657: Remember the attributes that are available during the nodetree evaluation for attribute search dropdown
Event Timeline
Okay, I've been fighting with the UI code for a while, time to write some things down.
There are two general approaches I've been trying:
The first is to build an RNA collection with the available attributes and store it in the socket or the node. This approach might simplify the UI code a bit.
However, generating the list of attributes requires the context (to fetch the proper NodeUIStorage from the context map), and as far as I can tell, RNA collection callbacks do not have a way to use the context.
So in order to use this method, we need to add a runtime pointer to the proper NodeUIStorage to every node socket. Then those data structures would be exposed to RNA.
The other approach, what I'm working on now, is more direct, and lower level, simply creating the search button directly in the C/C++ code. This avoids exposing anything to RNA, which probably lowers the total amount of changes considerably.
I've ran into some problems with this approach so far, but I'm working through them, so we'll see how it works.
I have some work in progress code in temp-geometry-nodes-attribute-search. rB45f6c9bd0533 explains some of the current issues.
