-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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 shortcuts to reset position, rotation and scale in Spatial and Canvas Item Editor #102888
base: master
Are you sure you want to change the base?
Conversation
Closes godotengine/godot-proposals#10612 Godot seems to have a little bit of identity crisis where it can't decide if it wants to be blender (G/R/S) (see #78148) or industry-compatible (the current W/E/R), I guess when that's resolved these shortcuts should conform to whatever is considered to be the primary way. For now it's still W/E/R so no changes are needed to this PR |
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.
Tested locally, it mostly works as expected (including undo/redo). Code looks good to me.
I noticed two issues though:
- In 3D, the shortcut should be ignored if currently in freelook, as holding Alt (for slow movement) and pressing W (to move forward on QWERTY) will reset the selected node's position.
- In 2D, resetting position/rotation/scale only works on nodes that inherit Node2D, not Control.
bcd4251
to
8fe4200
Compare
Thanks @Calinou, I've updated the code.
|
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.
Works great now 🙂
Could you squash the commits? See PR workflow for instructions. |
1c0502b
to
ac9d39d
Compare
Done. Thanks for the hint. |
These changes allow resetting Node3D and Node2D transforms in the Spatial and Canvas Item Editor according to proposal #11523.
The keybindings default to ALT+W (position), ALT+E (rotation) and ALT+R (scale) and thus align with the default bindings to activate Move Mode (W), Rotate Mode (E) and Scale Mode (R).
Either a single selected node or multiple selected nodes can be reset and the reset can be undone.
The keybindings can be changed under Editor Settings -> Shortcuts.
