Brush Assets: Highlight first brush on type to search, activate with enter #123853
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#123853
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "JulianEisel/blender:temp-asset-shelf-search-highligh-on-type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is implemented as a general view feature now. Whenever filtering is used, we attempt to highlight the first item so enter can activate it. Note that this still only works in the asset shelf popup so far though, because of the whole "semi-modal" text button that allows events to be passed to other buttons.
Moving the mouse makes the highlight jump back to the brush under the cursor again. This is how search menus behave too.
Technical changes:
WIP: Highlight first brush on type to search, activate with enterto Brush Assets: Highlight first brush on type to search, activate with enterIt all seems reasonable, just noticed a few smaller style things.
However it seems like it would make more sense to commit this to main than the branch?
@ -514,0 +515,4 @@
{
return ui_but_find(
region,
[](const uiBut *but, const void *) {
Use
/*named_argument*/
@ -514,0 +520,4 @@
return false;
}
const uiButViewItem *view_item_but = (const uiButViewItem *)but;
Use
reinterpret_cast
@ -33,0 +34,4 @@
{
const AbstractViewItem *found_item = nullptr;
foreach_view_item([&](const AbstractViewItem &item) {
this->foreach_view_item
@ -118,0 +145,4 @@
prev_filter_string_ = *filter_str;
bool has_search_highlight = false;
foreach_view_item([&](AbstractViewItem &item) {
this->
@ -166,0 +212,4 @@
void AbstractView::clear_search_highlight()
{
foreach_view_item([](AbstractViewItem &item) { item.is_highlighted_search_ = false; });
this->
@ -409,2 +449,3 @@
const View2D &v2d,
uiLayout &layout)
uiLayout &layout,
std::optional<StringRef> search_string)
I'd put this search string argument before
layout
to group "const/input" arguments before "outputs" (the layout).This is an optional argument, and I'd prefer to keep it that way since it's only used in a few cases.
There might be some conflicts, can try though. Working in the branch is easiest & most efficient for me right now, I can still split off individual changes later. I try to focus on getting through the remaining tasks currently.
Okay, that's fine, I was just thinking about this not ending up in the final brush assets commit. Thanks.
Committed to main with
4a9e8087a7
.Pull request closed