From 59c5c04e38b7727c8fd0c7ac26e68cbdd8b8799a Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 1 Jul 2021 12:43:06 +0200 Subject: [PATCH] Allow using the 3D editor's View menu while previewing a camera This is already allowed when using cinematic preview, but not when previewing a Camera3D the usual way. Many operations from the View menu still work while previewing a camera, such as switching between debug draw modes and toggling information panes. (cherry picked from commit fab3d136e0c1f3a3ba2a98dbc1f8cc1568858eee) --- editor/plugins/spatial_editor_plugin.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 731312e7bde..b555a73934e 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -3076,14 +3076,12 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) { if (!preview) { preview_camera->hide(); } - view_menu->set_disabled(false); surface->update(); } else { previewing = preview; previewing->connect("tree_exiting", this, "_preview_exited_scene"); VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace - view_menu->set_disabled(true); surface->update(); } } @@ -3316,7 +3314,6 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) { previewing = Object::cast_to(pv); previewing->connect("tree_exiting", this, "_preview_exited_scene"); VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace - view_menu->set_disabled(true); surface->update(); preview_camera->set_pressed(true); preview_camera->show();