godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.95k stars 20.17k forks source link

Animation panel: moving cursor to Scene view focuses it, preventing further use of Animation keyboard shortcuts #94544

Open hsandt opened 1 month ago

hsandt commented 1 month ago

Tested versions

System information

Godot v4.2.1.stable - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Mobile) - dedicated NVIDIA GeForce GTX 860M (nvidia; 535.161.07) - Intel(R) Core(TM) i7-4710HQ CPU @ 2.50GHz (8 Threads)

Issue description

When using the animation panel and focusing it (either the overall panel or a specific track and key) in order to use animation contextual shortcuts (such as Ctrl+Left/Right to move to previous/next step), and moving the cursor away to hover the Scene view, the Scene view will immediately be focused, preventing further use of Animation keyboard shortcuts.

This seems by design, maybe to allow Scene view shortcuts like W to switch to Translate mode; but no other panel does this, and therefore going back to the Animation panel is not even enough to focus the Animation panel again, you must click on it.

While this seems benign, I have a real use case where it bothers me a lot: I'm trying to estimate the number of pixels a sprite is moving by during some animation. I use my cursor as a reference for the initial pixel position. Then I use Ctrl+Right to advance the animation, and compare the cursor to the next pixel position. But moving the cursor focuses the Scene view and prevents me from advancing the animation. I have to play the animation very slowly while having the cursor over the Scene view, or inspect the animation directly in my graphics editor, to do what I want.

If it's an intended behavior then I'd like an option to disable it (I can reopen a feature request in this case).

Steps to reproduce

  1. Create some Animation and open the Animation Panel
  2. Add some track to test Ctrl+Left/Right shortcuts
  3. Move cursor to hover Scene view (without clicking)
  4. Observe focus switching to Scene view (blue frame highlight + Animation contextual shortcuts stop working)

Minimal reproduction project (MRP)

N/A

AThousandShips commented 1 month ago

Can you please confirm with 4.2.2, or even better 4.3.beta3 to get an idea where this currently occurs

Please make bug reports with a supported version, 4.2.1 is not supported and a lot of bugs have been fixed since 4.2.1

hsandt commented 1 month ago

I know, 4.2.2 just still have this very annoying issue of Find in Files popup losing field focus and that's why I never upgraded to it in actual projects. Fortunately this bug is trivial to check and I could confirm it for both 4.2.1 and 4.3.rc2.

I'll try to check on 4.2.2 instead of 4.2.1 every time since I open a new editor to test MWE anyway. But since 4.3 is already in RC I'll probably just run 4.3 RC from now on.

SatLess commented 2 weeks ago

It seems that this also happens with other tabs as well (NodeGroups, History, file-system, most of the tabs from the bottom panel). You can see which tab is selected with the blue outline and how it defaults to the viewport as soon as the mouse is off from those tabs. This functionality is likely to be intentional, although it is indeed bothersome whenever you're animating and it focus to the viewport.

Focus