X Tutup
Skip to content

Add shortcuts to reset position, rotation and scale in Spatial and Canvas Item Editor#102888

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
Shaderd00d:clear_transform
Oct 14, 2025
Merged

Add shortcuts to reset position, rotation and scale in Spatial and Canvas Item Editor#102888
Repiteo merged 1 commit intogodotengine:masterfrom
Shaderd00d:clear_transform

Conversation

@Shaderd00d
Copy link
Contributor

@Shaderd00d Shaderd00d commented Feb 15, 2025

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.
shortcuts

@passivestar
Copy link
Contributor

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

Copy link
Member

@Calinou Calinou left a 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.

@Shaderd00d
Copy link
Contributor Author

Thanks @Calinou, I've updated the code.

  • The shortcuts will now be ignored in 3D freelook mode.
  • position, rotation and scale can now be reset for Controls, too.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great now 🙂

@akien-mga akien-mga changed the title Added shortcuts to reset position, rotation and scale in Spatial and Canvas Item Editor Add shortcuts to reset position, rotation and scale in Spatial and Canvas Item Editor Mar 7, 2025
@akien-mga
Copy link
Member

Could you squash the commits? See PR workflow for instructions.

@Shaderd00d
Copy link
Contributor Author

Could you squash the commits? See PR workflow for instructions.

Done. Thanks for the hint.

@akien-mga akien-mga modified the milestones: 4.5, 4.6 Jun 12, 2025
@Repiteo
Copy link
Contributor

Repiteo commented Oct 1, 2025

Could you rebase your PR? It'll use the same pull request guidelines mentioned earlier, though it's now hosted on a new site

@Shaderd00d
Copy link
Contributor Author

@Repiteo I'll take care of it, but it may take a few days.
@AThousandShips thanks for the improvements.

@Shaderd00d Shaderd00d requested a review from a team October 2, 2025 18:33
@Shaderd00d
Copy link
Contributor Author

@Repiteo I believe this PR is now ready to be merged.

@Shaderd00d Shaderd00d requested review from a team as code owners October 4, 2025 12:34
@AThousandShips AThousandShips removed request for a team October 4, 2025 12:59
@Repiteo
Copy link
Contributor

Repiteo commented Oct 14, 2025

Thanks! Congratulations on your first merged contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add keyboard shortcuts for resetting transforms (position, rotation, scale)

8 participants

X Tutup