summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-06 10:19:41 +0100
committerGitHub <noreply@github.com>2022-03-06 10:19:41 +0100
commit52b6088c1de5aefad05cc16d5dabc024e231520f (patch)
tree354aa52f9129898c5cc45497e7430002fe9c19ee /editor
parente3231c3ee7d84af4dca09f38f571c798d8f2380a (diff)
parent34b87772b48d47601a55a7a93de07a96b7c44ae1 (diff)
Merge pull request #58800 from rcorre/blender-nav
Disable blender-style transforms in freelook.
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 1731344bd3..17c6457444 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2037,14 +2037,16 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (ED_IS_SHORTCUT("spatial_editor/cancel_transform", p_event) && _edit.mode != TRANSFORM_NONE) {
cancel_transform();
}
- if (ED_IS_SHORTCUT("spatial_editor/instant_translate", p_event)) {
- begin_transform(TRANSFORM_TRANSLATE, true);
- }
- if (ED_IS_SHORTCUT("spatial_editor/instant_rotate", p_event)) {
- begin_transform(TRANSFORM_ROTATE, true);
- }
- if (ED_IS_SHORTCUT("spatial_editor/instant_scale", p_event)) {
- begin_transform(TRANSFORM_SCALE, true);
+ if (!is_freelook_active()) {
+ if (ED_IS_SHORTCUT("spatial_editor/instant_translate", p_event)) {
+ begin_transform(TRANSFORM_TRANSLATE, true);
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/instant_rotate", p_event)) {
+ begin_transform(TRANSFORM_ROTATE, true);
+ }
+ if (ED_IS_SHORTCUT("spatial_editor/instant_scale", p_event)) {
+ begin_transform(TRANSFORM_SCALE, true);
+ }
}
// Freelook doesn't work in orthogonal mode.