Mouse selection is inaccurate in NLA Editor #100491

Closed
opened 2022-08-19 04:20:24 +02:00 by Colin Basnett · 10 comments
Member

System Information
Operating system: Windows 11
Graphics card: NVIDIA RTX 3060 TI

Blender Version
Broken: 3.2.2
Worked: Unknown

Short description of error
The mouse selection appears to have some sort of offset that makes it so that the user can select a track that they were not hovering over. The video below clearly shows the issue:

nlaselectbug.mp4

Exact steps for others to reproduce the error
nlatrackbug.blend

**System Information** Operating system: Windows 11 Graphics card: NVIDIA RTX 3060 TI **Blender Version** Broken: 3.2.2 Worked: Unknown **Short description of error** The mouse selection appears to have some sort of offset that makes it so that the user can select a track that they were not hovering over. The video below clearly shows the issue: [nlaselectbug.mp4](https://archive.blender.org/developer/F13402637/nlaselectbug.mp4) **Exact steps for others to reproduce the error** [nlatrackbug.blend](https://archive.blender.org/developer/F13402643/nlatrackbug.blend)
Author
Member

Added subscriber: @cmbasnett

Added subscriber: @cmbasnett
Author
Member

Just had a look at the code for this. It seems there is a built-in fudge-factor tolerance to the click, and the code explains why this is the case.

https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_nla/nla_select.c$286-290

  /* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click
   * (that is the size of keyframe icons, so user should be expecting similar tolerances)
   */
  float xmin = UI_view2d_region_to_view_x(v2d, region_x - 7);
  float xmax = UI_view2d_region_to_view_x(v2d, region_x + 7);

So this function will return the right-most track that is (more or less) under the mouse. I think that if multiple strips are under the mouse, it should be doing a more precise check to avoid the situation shown in the video.

Just had a look at the code for this. It seems there is a built-in fudge-factor tolerance to the click, and the code explains why this is the case. https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_nla/nla_select.c$286-290 ``` /* x-range to check is +/- 7 (in screen/region-space) on either side of mouse click * (that is the size of keyframe icons, so user should be expecting similar tolerances) */ float xmin = UI_view2d_region_to_view_x(v2d, region_x - 7); float xmax = UI_view2d_region_to_view_x(v2d, region_x + 7); ``` So this function will return the right-most track that is (more or less) under the mouse. I think that if multiple strips are under the mouse, it should be doing a more precise check to avoid the situation shown in the video.

Added subscriber: @iss

Added subscriber: @iss

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

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

On one hand, code works as intended so hard for me to say it is a bug, but then I don't think it works well and it does not seem consistent with timeline (and other) editor selection. If there should be tolerance, I would expect to pick closest strip to cursor position.

Will confirm as known issue and make a patch - should be very easy. Will see if there will be any concerns during review.

On one hand, code works as intended so hard for me to say it is a bug, but then I don't think it works well and it does not seem consistent with timeline (and other) editor selection. If there should be tolerance, I would expect to pick closest strip to cursor position. Will confirm as known issue and make a patch - should be very easy. Will see if there will be any concerns during review.
Member

Added subscriber: @BClark

Added subscriber: @BClark
Member

"that is the size of keyframe icons, so user should be expecting similar tolerances"

Thanks for finding that, I disagree that I would expect the same kind of thing, if I click even at the end of a clip, I want the clip I clicked on.

Agree that it would be nice to remove this "odd" feeling choice in the code.

"that is the size of keyframe icons, so user should be expecting similar tolerances" Thanks for finding that, I disagree that I would expect the same kind of thing, if I click even at the end of a clip, I want the clip I clicked on. Agree that it would be nice to remove this "odd" feeling choice in the code.
Member

it would also be nice to remove it so that if we ever add in "manipulators" to the start/end of the clip edges so that users an drag trim or blend the clips that they don't pick the wrong area.

it would also be nice to remove it so that if we ever add in "manipulators" to the start/end of the clip edges so that users an drag trim or blend the clips that they don't pick the wrong area.

This issue was referenced by 970be7e65a

This issue was referenced by 970be7e65ae7fce9d58839c3c0bd65bd6dced74b

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Richard Antalik self-assigned this 2022-11-14 20:09:16 +01: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
4 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#100491
No description provided.