Skip to content

Commit 04aa1f6

Browse files
committed
Bind Blender-style translate, rotate and scale shortcuts in the 3D editor
These used to have no binds by default, which severely limited their discoverability. The default bindings are the same as in Blender: G for translate, R for rotate, S for scale. The default shortcut for the Rotate tool has been moved to Ctrl + R (Cmd + R) on macOS to accomodate for this change. While this makes the shortcut less consistent with the usual "Q-W-E-R-T" line of shortcuts, quick rotation with Blender-style transforms is arguably more convenient during day-to-day editor operation. To avoid breaking people's muscle memory, we should try to use shortcuts as similar as possible to Blender's. The S key is only used for scaling if not currently in freelook mode.
1 parent 826de79 commit 04aa1f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

editor/plugins/node_3d_editor_plugin.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -5381,9 +5381,9 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
53815381
ED_SHORTCUT("spatial_editor/lock_transform_xz", TTR("Lock Transformation to XZ plane"), KeyModifierMask::SHIFT | Key::Y);
53825382
ED_SHORTCUT("spatial_editor/lock_transform_xy", TTR("Lock Transformation to XY plane"), KeyModifierMask::SHIFT | Key::Z);
53835383
ED_SHORTCUT("spatial_editor/cancel_transform", TTR("Cancel Transformation"), Key::ESCAPE);
5384-
ED_SHORTCUT("spatial_editor/instant_translate", TTR("Begin Translate Transformation"));
5385-
ED_SHORTCUT("spatial_editor/instant_rotate", TTR("Begin Rotate Transformation"));
5386-
ED_SHORTCUT("spatial_editor/instant_scale", TTR("Begin Scale Transformation"));
5384+
ED_SHORTCUT("spatial_editor/instant_translate", TTR("Begin Translate Transformation"), Key::G);
5385+
ED_SHORTCUT("spatial_editor/instant_rotate", TTR("Begin Rotate Transformation"), Key::R);
5386+
ED_SHORTCUT("spatial_editor/instant_scale", TTR("Begin Scale Transformation"), Key::S);
53875387

53885388
preview_camera = memnew(CheckBox);
53895389
preview_camera->set_text(TTR("Preview"));
@@ -8555,7 +8555,7 @@ Node3DEditor::Node3DEditor() {
85558555
tool_button[TOOL_MODE_SCALE]->set_toggle_mode(true);
85568556
tool_button[TOOL_MODE_SCALE]->set_theme_type_variation("FlatButton");
85578557
tool_button[TOOL_MODE_SCALE]->connect(SceneStringName(pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed).bind(MENU_TOOL_SCALE));
8558-
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), Key::R));
8558+
tool_button[TOOL_MODE_SCALE]->set_shortcut(ED_SHORTCUT("spatial_editor/tool_scale", TTR("Scale Mode"), KeyModifierMask::CMD_OR_CTRL | Key::R));
85598559
tool_button[TOOL_MODE_SCALE]->set_shortcut_context(this);
85608560
tool_button[TOOL_MODE_SCALE]->set_tooltip_text(keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL) + TTR("Drag: Use snap.") + "\n" + TTR("Alt+RMB: Show list of all nodes at position clicked, including locked."));
85618561

0 commit comments

Comments
 (0)