From 55fda17742f85309aba5a60a2a969a5565d944b9 Mon Sep 17 00:00:00 2001 From: Marcus Brummer Date: Fri, 11 Feb 2022 11:36:47 +0100 Subject: [PATCH] Deselect nodes in the 3D editor when pressing ESC --- editor/plugins/node_3d_editor_plugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 5f5872459468..3fdf4579ff82 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -1888,7 +1888,12 @@ void Node3DEditorViewport::_sinput(const Ref &p_event) { } } - if (_edit.mode != TRANSFORM_NONE) { + if (_edit.mode == TRANSFORM_NONE) { + if (k->get_keycode() == Key::ESCAPE && !cursor.region_select) { + _clear_selected(); + return; + } + } else { // We're actively transforming, handle keys specially TransformPlane new_plane = TRANSFORM_VIEW; String new_message;