-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The hiding of Script Editor when selecting node in Scene Tree #39539
Comments
I prefer option 2. For me this behaviour was always counter-intuitive and it happens quite frequently. It's maybe one click more, if we want to change the view, but it's a logical click that makes sense, whereas the current behaviour can be quite irritating, because in a lot of scenarios it's just doing additional stuff you did not intent and you find your self fighting with it and having to go back manualy again. It happend to me both, when I wanted to look at a property or property path of a node or when I tried to drag and drop the node path into the text editor. I don't think there should be an option for it, as I don't like bloated editor settings. For me the proposed solution ( in #14862) of using a doubleclick for the current behaviour would make more sense. Fixing this behaviour would be very appreciated. Thanks! |
Ah yes, I forgot that there's a 4th option actually. |
Then I'm for option 4! |
I think using double-click for this makes the most sense too. |
Isnt double-click triggering node rename? |
Could give rename a default keybinding and make double clicking the node show it in the scene in one way or another. Also, double clicking on the icon to teleport the camera to it is pretty unintuitive and hard to find if you don't know about it already. |
This is done by #38201, but it seems some users still prefer double-clicking nodes to rename them instead of pressing F2 (perhaps because they don't know about this shortcut in general). |
It may be worth keeping in mind that Assuming that people using Macs keep the default keyboard settings, I'm definitely in favour of not unintentionally switching away from the Script Editor though. :) |
I'm for option 2. If you are in the script editor and you click on a node, I think the behaviour should be to show that node in the inspector and stay in the script editor, because if you are in the script editor... well... you are working on scripts, and thats what you want to do. If you want to see the 2D/3D representation, just click on the 2D/3D buttons at the top to switch. I dont think there should be a shortcut to get there in the scene tree, apart from maybe a |
Maybe |
More like Alt+Click, Shift is used for multiselecting. But sounds like a good option. |
I think not changing context should be the default. Changing context should require a modifier like Alt instead. |
one other related issue is that when you switch from 2D to scripting panel, the scene tree is not hidden by default or according to the user's preferences. |
After #55761 was merged, you can now hold Alt while clicking in the scene tree to prevent the viewport from switching. This resolves the issue, but just isn't very discoverable. |
Probably yes. As for the issue, I recently seen someone mention an alternative solution. Instead of using a random modifier, the editor could switch only after release/long press of the button and don't switch when you drag. If that could work then it would be better, as there is no use in only selecting a node without focusing; you always want to drag it. |
Pretty please :) |
Maybe a pin/lock can help too (animationplayer has one, for example), for script editor and 2d/3d viewports, sometimes you just want to see an item in the inspector, drag and drop, etc. without changing the main view. |
I would really like to stay on the script I'm editing when I hit the Play button. I really have no clue why it would switch to a different view. |
Does not work on macOS on 4.2 beta |
It was removed. Editor will automatically detect whether you are dragging or not and switch if not. |
my bad, but the issue still persists, if I want to change different inspector values while using the viewport, since in a 3D view the viewport disables the 2D and when the editor toggles you basically get an empty screen |
Can you post some video of the issue? |
Sure, some explanation - in the video I'm testing if adjusting the scale would work for my indicator, before writing the code and this is when I hit this annoying issue Screen.Recording.2023-10-20.at.0.28.36.mp4 |
That's another issue, see godotengine/godot-proposals#8150 |
I just discovered a function called
can_lose_focus_on_node_selection()
in ScriptEditorPlugin class. It returnsfalse
for VisualScript editor andtrue
for other script editors. When it's true, clicking a node in Scene Tree will change the viewport to this node's native (i.e. 2D or 3D). Before the function was introduced, Godot would switch away from Script Editor unconditionally.Now, I've seen an issue where this behavior was labeled as a bug: #14862
There's also #33704, which is related
EDIT: Another old issue: #20676 (this time enhancement)
The question is: is this behavior useful? Many users will probably agree that if you are in the Script Editor, you want to click nodes in Scene Tree without hiding the Script Editor (some people want e.g. to check them in the inspector). Personally I don't see why would we want to switch on click, other than it being maybe faster than clicking the 2D/3D button on the top.
I opened this issue to discuss this problem. We could either:
can_lose_focus_on_node_selection()
method)Any thoughts?
The text was updated successfully, but these errors were encountered: