godotengine / godot

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

Minor issue with tools when SubViewport is selected #92072

Closed JekSun97 closed 1 day ago

JekSun97 commented 1 month ago

Tested versions

Happens in Godot 4.3 dev, but does not happen in 4.2.2

System information

Godot v4.3.dev6 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated Radeon RX 560 Series (Advanced Micro Devices, Inc.; 31.0.14001.45012) - Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 Threads)

Issue description

When I select a SubViewport node or its child nodes, then select the move or scale or rotation tool, and hold down the mouse, a selection rectangle appears. This is hardly a significant problem, but it's worth knowing about. in 4.2 there is no selection.

https://github.com/godotengine/godot/assets/130399274/1c83d577-8871-4ecb-a81a-15bb6d7f80e6

Steps to reproduce

Select the SubViewport and simulate its movement in the scene using the move tool

Minimal reproduction project (MRP)

Not required

ryevdokimov commented 1 month ago

It's due to https://github.com/godotengine/godot/pull/86804.

I don't think this is a bug. You're not supposed to be able to interact with these type of Nodes (Popups, Timers, Subviewports, etc.) with the editor gizmo, so it defaults to trying to select something that you can.

JekSun97 commented 1 month ago

It's due to #86804.

I don't think this is a bug. You're not supposed to be able to interact with these type of Nodes (Popups, Timers, Subviewports, etc.) with the editor gizmo, so it defaults to trying to select something that you can.

Then it would be more convenient to make sure that when selecting a SubViewport node, unused tools are hidden or inactive.

Either way, it doesn't look very nice compared to 4.2 when your cursor indicates that it should move something but instead it selects

ryevdokimov commented 1 month ago

What do you mean by unused? That PR makes all tools useable in that state by allowing them to select nodes if a node that can use the gizmo isn’t already selected (with the exception of the select tool, which can always select).

Either way, it doesn't look very nice compared to 4.2 when your cursor indicates that it should move something but instead it selects

It can't move anything when the SubViewport is selected, which is why is defaults to selecting

akien-mga commented 5 days ago

CC @KoBeWi, WDYT?

KoBeWi commented 5 days ago

Looks like the tools are not handled correctly when node in viewport is selected. Instead of doing no-op, it does fallback to selection.