-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
While the Script Editor Plugin is active, makes it optional to switch Editor Plugins when selecting Nodes in the Scene Tree #63344
Conversation
Please refrain from adding comments that don't add to the discussion of this change. If you just want to express your support for this change, use the reaction on the PR itself for that. Thank you! (Comments add some noise for maintainers who then see the PR has received an update; some also get an email about it. It also makes discussion harder to follow in longer PR comment chains.) |
I don't know if I like this solution, feels not optimal to me. What about the switching only happening if an already selected node gets clicked again? (click down + release, to allow dragging it without a switch) |
Note that this is already available when holding Alt while clicking in the scene tree dock. Unfortunately, most window managers on Linux will intercept Alt + clicking by default, so Godot will never see those clicks. |
Isn't the default behaviour more of a legacy leftover than actually being useful? Since, if you are in the Script editor, the intended behaviour when navigating Nodes is to inspect and/or contextualize Nodes. If you are to switch to the 2D/3D contexts, it's clear that they can be accessed through their corresponding toolbar buttons and hotkeys.
If it requires you to drag the node to not switch the editor, how would you inspect the Nodes in the Inspector and access their context menu, while staying in the Script editor? Wouldn't that require you to actively loosely drag Nodes and let them go, without the intention of actually dragging, but just because you want to access the Inspector for that Node? Dragging and dropping to get path nodes is just a secondary benefit from this, the two biggest pain points to be fixed are getting distraction-free and hassle-free access to Inspecting any Node and access to the context menu of any Node, while staying in the Script Editor, without toggling a context switching. |
Ok it makes sense to prevent switching on node click.
idk I sometimes use it, but I agree that more often it's annoying and not switching is more useful.
Or maybe we could switch when Alt is held or something. But editor setting is fine too probably; it should be enabled by default though. Also the name could be better, like |
Hi all, first comment event in github. I would like introduce another posible solution. |
I agree with@8to16apps and also think a pin icon in the script toolbar is definitely a cleaner solution. Very discoverable and easy to toggle on and off. |
@reduz @8to16apps I'm not sure I understand where exactly it should be. A mockup would be welcome. |
@alfredbaudisch @reduz I am thinking in something like this. This is the same concept that the animation tap in the bottom. |
@8to16apps Good point. Doing this way would keep it consistent with the pin behaviour of the AnimationPlayer. |
btw the pin button can simply toggle the editor setting, so you can keep your current changes. |
You're fast as I was about to comment: my implementation wouldn't change. |
We put pins on the right side, so I guess I would put it on the right side here too. |
@reduz @8to16apps Done, thanks for the suggestion. This makes a lot of sense. GodotSwitchScriptPin.mp4 |
The commits need to be squashed before the PR can be merged. You can follow the instructions for that here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html#the-interactive-rebase You can use |
d10ee6c
to
238c790
Compare
@YeldhamDev Done |
The pin feels like a lot of micromanagement for something that should probably work one way out of the box. Like Emi mentioned on Twitter, I'd probably get annoyed by the pin button wasting space and remove it with a plugin. I don't believe it's something you need to constantly change to justify having it so visible. |
I'm neutral about it actually, since the problem is fixed with or without the pin. So how things like this are normally decided? @YuriSizov |
I guess we'll discuss it during the next PR review meeting. You are welcome to join, it's on Tuesday (watch out in #devel channel on RocketChat). |
…s "Script" and if text_editor/behavior/navigation/stay_in_script_editor_on_node_selected is true, force inspector_only in order to not switch the EditorPlugin to the Node's main plugin.
238c790
to
c4433c3
Compare
The pin has been removed in favor of keeping the first basic implementation of just the Editor setting (on by default), as per some Twitter conversation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Not 100% convinced by the setting name but this could be improved later on.
Thanks! |
Can this be cherry-picked to 3.x branch? |
Cherry-picked for 3.5. @alfredbaudisch Just noticed it but for future commits, please try to keep the commit message title (first line) at a reasonable length. It should typically be less than 72 chars, the current one is 255 (i.e. your commit title is a full description instead of a title).
|
@akien-mga Thanks Rémi for fixing the commit message and for the tips! I'll keep those conventions in mind for possible future contributions. |
Problem
editor_plugin_screen
to be changed to the Node's main plugin.GodotSwitchjingAnnoying.mp4
Solution
text_editor/behavior/navigation/node_select_toggles_inspector_only
.GodotSweitchSolved.mp4
Is it really needed?