NLA viewport jumps upward when track search input is focused #97530

Closed
opened 2022-04-22 02:37:21 +02:00 by Colin Basnett · 13 comments
Member

System Information
Operating system: Windows 10
Graphics card: NVIDIA GTX 1070

Blender Version
Broken: 3.1
Worked: Unknown

Short description of error
The NLA viewport jumps upward when the track search input box is focused by clicking on it.

nlajumpfocus.gif

Exact steps for others to reproduce the error

  1. Make a bunch of NLA tracks (not necessary, but demonstrates the bug better)
  2. Pan the viewport of the NLA editor down a ways
  3. Click on the track search input box (note that it jumps here!)
  4. Click anywhere else in the UI
  5. Repeat 3 & 4 for bonus marks
**System Information** Operating system: Windows 10 Graphics card: NVIDIA GTX 1070 **Blender Version** Broken: 3.1 Worked: Unknown **Short description of error** The NLA viewport jumps upward when the track search input box is focused by clicking on it. ![nlajumpfocus.gif](https://archive.blender.org/developer/F13015147/nlajumpfocus.gif) **Exact steps for others to reproduce the error** 1. Make a bunch of NLA tracks (not necessary, but demonstrates the bug better) 2. Pan the viewport of the NLA editor down a ways 3. Click on the track search input box (note that it jumps here!) 4. Click anywhere else in the UI 5. Repeat 3 & 4 for bonus marks
Author
Member

Added subscriber: @cmbasnett

Added subscriber: @cmbasnett
Member

Added subscriber: @BClark

Added subscriber: @BClark
Member

Yes little things like that are tiny but cause artists to be nervous that something isn't right, and if something simple like a search bar does this, what else is wrong.. feelings start to appear when the tools are being used!!

Yes little things like that are tiny but cause artists to be nervous that something isn't right, and if something simple like a search bar does this, what else is wrong.. feelings start to appear when the tools are being used!!
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Did anyone have time to take this on, been making me crazy all week in the NLA

Did anyone have time to take this on, been making me crazy all week in the NLA
Member

Added subscriber: @nrupsis

Added subscriber: @nrupsis
Member

This behavior is consistent with the graph editor, and action editor too. All of which call the ED_time_scrub_channel_search_draw method. Still unsure why it's happening...

Graph_editor.gif

This behavior is consistent with the graph editor, and action editor too. All of which call the `ED_time_scrub_channel_search_draw` method. Still unsure why it's happening... ![Graph_editor.gif](https://archive.blender.org/developer/F13469368/Graph_editor.gif)
Author
Member

I believe I figured out the cause of this, though I'm not sure how best to fix it.

Basically, the search bar is being anchored to the top, but it is still just part of the channel region (as evidence by the fact you can middle-mouse click the search bar and move the channel view up and down). This is technically no different than, say, a text box on a horizontal toolbar.

There is logic that says when text edit buttons are brought into focus that the view must ensure that the text box is within the bounds of the view, plus padding.

Therefore, when the text box is focused, the view jumps up by the number of padding pixels (around 10 on default settings).

Here is the stack trace of where the bug is occurring.

blender.exe!UI_but_ensure_in_view(const bContext * C, ARegion * region, const uiBut * but) Line 931	C++
blender.exe!ui_textedit_begin(bContext * C, uiBut * but, uiHandleButtonData * data) Line 3452	C
blender.exe!button_activate_state(bContext * C, uiBut * but, uiHandleButtonState state) Line 8301	C
blender.exe!ui_do_but_TEX(bContext * C, uiBlock * block, uiBut * but, uiHandleButtonData * data, const wmEvent * event) Line 4625	C
blender.exe!ui_do_button(bContext * C, uiBlock * block, uiBut * but, const wmEvent * event) Line 8022	C
blender.exe!ui_handle_button_event(bContext * C, const wmEvent * event, uiBut * but) Line 9312	C
blender.exe!ui_region_handler(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 11276	C
[Inline Frame] blender.exe!wm_handler_ui_call(bContext *) Line 790	C++
blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3222	C++
blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3342	C++
[Inline Frame] blender.exe!wm_event_do_handlers_area_regions(bContext *) Line 3788	C++
blender.exe!wm_event_do_handlers(bContext * C) Line 3984	C++
blender.exe!WM_main(bContext * C) Line 643	C
blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 582	C
[External Code]	

Edit: Come to think of it, I think the only good way to fix this would be to reconfigure how the layout of this is done to begin with. The search bar should not be part of the channel region. This would probably also eliminate a lot of jank code that has to account for the space permanently occupied by the search bar.

I believe I figured out the cause of this, though I'm not sure how best to fix it. Basically, the search bar is being anchored to the top, but it is still just part of the channel region (as evidence by the fact you can middle-mouse click the search bar and move the channel view up and down). This is technically no different than, say, a text box on a horizontal toolbar. There is logic that says when text edit buttons are brought into focus that the view must ensure that the text box is within the bounds of the view, **plus padding**. Therefore, when the text box is focused, the view jumps up by the number of padding pixels (around 10 on default settings). Here is the stack trace of where the bug is occurring. ``` blender.exe!UI_but_ensure_in_view(const bContext * C, ARegion * region, const uiBut * but) Line 931 C++ blender.exe!ui_textedit_begin(bContext * C, uiBut * but, uiHandleButtonData * data) Line 3452 C blender.exe!button_activate_state(bContext * C, uiBut * but, uiHandleButtonState state) Line 8301 C blender.exe!ui_do_but_TEX(bContext * C, uiBlock * block, uiBut * but, uiHandleButtonData * data, const wmEvent * event) Line 4625 C blender.exe!ui_do_button(bContext * C, uiBlock * block, uiBut * but, const wmEvent * event) Line 8022 C blender.exe!ui_handle_button_event(bContext * C, const wmEvent * event, uiBut * but) Line 9312 C blender.exe!ui_region_handler(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 11276 C [Inline Frame] blender.exe!wm_handler_ui_call(bContext *) Line 790 C++ blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3222 C++ blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3342 C++ [Inline Frame] blender.exe!wm_event_do_handlers_area_regions(bContext *) Line 3788 C++ blender.exe!wm_event_do_handlers(bContext * C) Line 3984 C++ blender.exe!WM_main(bContext * C) Line 643 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 582 C [External Code] ``` Edit: Come to think of it, I think the only good way to fix this would be to reconfigure how the layout of this is done to begin with. The search bar should not be part of the channel region. This would probably also eliminate a lot of jank code that has to account for the space permanently occupied by the search bar.

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

In #97530#1450613, @cmbasnett wrote:
Edit: Come to think of it, I think the only good way to fix this would be to reconfigure how the layout of this is done to begin with. The search bar should not be part of the channel region. This would probably also eliminate a lot of jank code that has to account for the space permanently occupied by the search bar.

Without knowing much about the UI code, that looks like the right way to go for me, indeed.

> In #97530#1450613, @cmbasnett wrote: > Edit: Come to think of it, I think the only good way to fix this would be to reconfigure how the layout of this is done to begin with. The search bar should not be part of the channel region. This would probably also eliminate a lot of jank code that has to account for the space permanently occupied by the search bar. Without knowing much about the UI code, that looks like the right way to go for me, indeed.
Author
Member

I've posted a question on the devtalk forums about how best to fix this: https://devtalk.blender.org/t/fixing-artificial-header-ui-in-animation-editors/26753

I've posted a question on the devtalk forums about how best to fix this: https://devtalk.blender.org/t/fixing-artificial-header-ui-in-animation-editors/26753
Philipp Oeser removed the
Interest
Animation & Rigging
label 2023-02-09 14:35:07 +01:00
Member

Following up here now that it is in the new system

Following up here now that it is in the new system
Brad Clark added this to the Animation & Rigging project 2023-03-20 17:38:45 +01:00
Brad Clark modified the project from Animation & Rigging to User Interface 2023-03-20 21:37:34 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-04-28 19:06:46 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#97530
No description provided.