Merge pull request #50836 from Calinou/3d-editor-camera-preview-add-shortcut

Add shortcut to toggle the 3D editor's camera preview
This commit is contained in:
Rémi Verschelde 2021-07-27 13:34:10 +02:00 committed by GitHub
commit 0f7b7bcbce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -4261,6 +4261,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito
preview_camera = memnew(CheckBox);
preview_camera->set_text(TTR("Preview"));
preview_camera->set_shortcut(ED_SHORTCUT("spatial_editor/toggle_camera_preview", TTR("Toggle Camera Preview"), KEY_MASK_CMD | KEY_P));
vbox->add_child(preview_camera);
preview_camera->set_h_size_flags(0);
preview_camera->hide();