Deselect nodes in the 3D editor when pressing ESC

This commit is contained in:
Marcus Brummer 2022-02-11 11:36:47 +01:00
parent 3aa7b7eaf2
commit 55fda17742
1 changed files with 6 additions and 1 deletions

View File

@ -1888,7 +1888,12 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &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;