Blender Git Commit Log

Git Commits -> Revision f5ede4e

March 3, 2021, 17:15 (GMT)
UI: Expose an "is first search" boolean to search button callbacks

Currently when you open an RNA collection search button, like a
vertex group selector, the search filter isn't applied until you
start typing, in order to display every option at the start.
Otherwise they wouldn't be visible, since the search filter would
run for the current text.

Currently this check happens in one place, but it relies on the
`changed` value of `uiBut`. This is fine in the interface directory,
but anywhere else it would require exposing `uiBut.changed`, which
is probably too low-level to expose.

The solution is adding an `is_first` argument to the search callbacks,
which is nice for a few reasons:
- They work at a higher level of abstraction, meaning they don't
have to worry about how exactly to tell if this is the first
- It makes it easier to do special behavior when the search menu
is first opened.
- Then, obviously, it makes that state accessible without including

Needed for attribute search: T85658

Differential Revision:

Commit Details:

Full Hash: f5ede4ed8cc3d32674794737764cf0b1e6713242
Parent Commit: 3f8edc5
Committed By: Julian Eisel
Lines Changed: +55, -20

By: Miika HämäläinenLast update: Nov-07-2014 14:18 MiikaHweb | 2003-2022