-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add Blender-inspired UI and shortcuts for transform tools in 3D editor #1215
Comments
I also realize most of the feedback on godotengine/godot#19186 was negative. I'm suggesting this because:
|
@rcorre I definitely approve of having Vim-like shortcuts in the 3D editor. It's one of the cases where I actually managed to stick to Vim-like shortcuts |
I know some FOSS users coming from Blender to Godot who are used to the highly efficient keyboard shortcuts of Blender and would greatly appreciate something similar in Godot. |
Im not very experienced in blender, but i agree having better shortcuts when working in the 3d editor would be very much appreciated. It's a pain currently to modify transform properties of 3d objects since you have to go back and firth between clicking the gizmo buttons way in the upper left of viewport and clicking objects in the viewport, wgich are usually very far away from the gizmo buttons. |
While actively using a transform tool, you can press X/Y/Z to lock the transform to an axis or (shift)+X/Y/Z to constrain the transform to a plane. These keys are only processed if you have a transform tool (translate/rotate/scale) active _and_ the mouse button is held. When we handle a key during a transform, we need to accept/return so it doesn't cascade through. In particular, without this "Y" will toggle snap mode unintentionally. See godotengine/godot-proposals#1215.
Pressing XX/YY/ZZ will lock the transform to a local (rather than global) axis. This is achieved by temporarily toggling the local transform button. I did this (vs handling it in the transform functions) for 3 reasons: - Transform logic for translate/rotate (but not scale) appears to be tightly coupled to the gizmo - This ensures the gizmo changes to indicate we're transforming locally/globally - Toggling the button state in the UI also gives the user feedback about the nature of the transform. The original state of the button is reset when the transform completes. See godotengine/godot-proposals#1215.
Pressing the `spatial_editor/cancel_transform` shortcut key during a transform operation will cancel the transform and reset the objects back to their original transforms. This functionality was already accessible by pressing RMB during a transform, however: - ESC is more familiar to blender users, and a more common "cancel" key in general. - Given you must hold LMB during a transform, pressing RMB as well is clumsy if not impossible (on a laptop trackpad). See godotengine/godot-proposals#1215.
This adds shortcuts for "instant" transforms, where you can press the key and immediately be transforming an object without holding the mouse then click to commit the transformation (or ESC to abort). This is inspired by Blender's G(rab)/R(otate)/S(cale) shortcuts, but I decided not to add default bindings as `S` is already bound to the regular scale tool, and it might be confusing to only bind some of them. See godotengine/godot-proposals#1215.
I've implemented all of this (except shift-for precision*) on 3.2.2-stable over here. I'm happy to port to 4.0 if there's an interest. * shift-for-precision is tricky as the current code doesn't accumulate motion, it just compares the current mouse position to the position when you started the transform. This means holding shift will suddenly reset your transform to an earlier point (rather than just adding smaller increments to the current amount, as blender does). I didn't think this was useful enough to significantly change the current transform code (espeicially since shift already works for snap mode, enabling smaller snap increments). |
@rcorre Another great addition can be improving the numpad controls in the editor inspired from Blender. As of now Godot only uses nkeys This is just a suggestion to improve this GIP. :) |
Thanks @SecretPanda420! I don't think I've ever used 2/4/6/8 in Blender, but maybe I should try 😆 |
I support this idea, but I remember these hotkeys working by 15-degree increments, not 45-degree increments. (I just tested it in Blender 2.83.3; it takes 6 key presses to rotate by 90 degrees.) |
They are 15-degree increments indeed. My bad. |
Add blender-style numpad 2,4,6,8 shortcuts that pivot the view in 15-degree increments. Mentioned in godotengine/godot-proposals#1215.
Implemented 3D view "orbiting" shortcuts (that is apparently what blender calls them) in eb483de30656f1edeb1aa5efd0e5cca4a4c275c6. |
Might as well add |
See godotengine/godot-proposals#1215. This adds shortcuts for blender-inspired transforms, where you can press the key and immediately be transforming an object without holding the mouse. Clicking commits the transformation, ESC aborts it. This is inspired by Blender's G(rab)/R(otate)/S(cale) shortcuts, but I decided not to add default bindings as `S` is already bound to the regular scale tool, and it might be confusing to only bind some of them. While actively using a transform tool, you can press X/Y/Z to lock the transform to an axis or (shift)+X/Y/Z to constrain the transform to a plane. These keys are only processed if you have a transform tool (translate/rotate/scale) active _and_ the mouse button is held. Pressing XX/YY/ZZ will lock the transform to a local (rather than global) axis. This is achieved by temporarily toggling the local transform button. I did this (vs handling it in the transform functions) for 3 reasons: - Transform logic for translate/rotate (but not scale) appears to be tightly coupled to the gizmo - This ensures the gizmo changes to indicate we're transforming locally/globally - Toggling the button state in the UI also gives the user feedback about the nature of the transform. The original state of the button is reset when the transform completes. Pressing the `spatial_editor/cancel_transform` shortcut key during a transform operation will cancel the transform and reset the objects back to their original transforms. This functionality was already accessible by pressing RMB during a transform, however: - ESC is more familiar to blender users, and a more common "cancel" key in general. - Given you must hold LMB during a transform, pressing RMB as well is clumsy if not impossible (on a laptop trackpad).
I see this is closed. Is it possible to use Blender shortcuts in Godot yet please? It's very difficult trying to switch between the two apps shortcuts in my head |
@RichardJECooke yes, but you must manually assign the shortcuts, as some of them conflict with bultin shortcuts: #1215 (comment)
|
If I have to manually copy and paste every one of Blender's shortcuts into Godot's options manually, then what is the point of this issue? Is there no way to switch on Blender shortcuts automatically? I don't understand. |
The point of this issue, AIUI, is to have those options at all. |
But doesn't Godot already have translate/rotate/scale, select, zoom, pan, etc? |
It does, but Blender's behavior is different in that it immediately enters the mode (you press the button and it immediately scales the model). In Godot, you need another click or two. At the time this proposal was created, Godot didn't have locking to global or local axis AT ALL IIRC. |
godotengine/godot#78148 implements default shortcuts for Blender-style transform options, but it's not guaranteed to be merged due to godotengine/godot#78148 (comment). |
Hi, a question regarding this feature:
|
@bitinn I'm not aware of a way to de-select the current object or select another object in the middle of a transform in Blender. Can you explain how to do that? |
@rcorre hi, I meant Blender has this option to delay immediate transform, which means you don't immediate move/rotate/scale object: This is actually closer to Godot 4's current behavior, you press W/E/R to enter transform mode, but it won't immediate move/rotate/scale the node, you need to hold mouse left button + drag to trigger that. Since Blender with such settings can de-select active object or select another object. I feel Godot 4 is missing some key convenience here. (Also because this is standard among 2 other major game engines.) |
I still can't figure out where that option is. However, I think what you're describing merits a separate issue. This issue was specifically for the "Immediate" style tranforms. |
@rcorre for reference, under Blender 3.6 LTS, it is available if you use the default blender keymap: But yes this needs to be done in a separate proposal, my question was whether this is by-design, because the current behavior is in Godot 4 is more like |
The default behavior in Godot4 is more like Active Tool than Immediate. If you want Immediate-style transforms, bind the following editor shortcuts:
These are not bound by default as they conflict with the builtin bindings. The number of questions we're getting suggest this feature is not very discoverable, but I'm not sure what do do about that. |
Just to be clear, I want the |
What about showing a list of shortcuts available? (As Blender does too) "Show insights into what shortcuts are available in the current context" #7976 |
This would only help for shortcuts that are bound by default. These are not, as they conflict with builtin shortcuts. So "s" would show as "Scale Tool", not "Begin Scale Transformation". |
Describe the project you are working on:
FPS, but applies to almost any 3D project.
Describe the problem or limitation you are having in your project:
I find blenders UI for transforms to be very intuitive, fast, and accurate, specifically the following behavior:
and translation is performed until you confirm or cancel (no need to hold a mouse button)
Click confirms, ESC cancels (restoring the original transforms).
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Implement the above features in Godot's 3D editor.
This is a revival of godotengine/godot#19186.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
I think this can be broken up into several chunks. Maybe we don't take all of them, but some are low-hanging fruit that I think will provide a lot of benefit with little complexity:
- Implemented in rcorre/godot@4bb6738
If this enhancement will not be used often, can it be worked around with a few lines of script?:
See the addon below. It isn't horrible, but it isn't "a few lines" either.
Is there a reason why this should be core and not an add-on in the asset library?:
I actually started work on an addon to do exactly this.
It is still a PoC but demonstrates much of the functionality I describe above.
However, I was looking through the Godot source and realized that most of this is already implemented.
For example, you can already cycle through axis locks by pressing the middle-mouse button while holding down the left-mouse button.
However, this is clumsy and hard to discover (I didn't realize it existed until I saw it in the source).
So this could be implemented as a plugin, but I got tired of re-implementing Godot's editor logic and decided to try patching the editor instead.
The text was updated successfully, but these errors were encountered: