diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-07-01 12:43:06 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-07-01 12:43:53 +0200 |
commit | fab3d136e0c1f3a3ba2a98dbc1f8cc1568858eee (patch) | |
tree | d309d54d16b4591e7d8ded1fafe754d07d3d87b7 | |
parent | 7ee419f8d97657df558cd9e0eab4671a36f3c21f (diff) |
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.
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index b2cbd56b1a..c2f5539183 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -3254,14 +3254,12 @@ void Node3DEditorViewport::_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", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene)); RS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), preview->get_camera()); //replace - view_menu->set_disabled(true); surface->update(); } } @@ -3508,7 +3506,6 @@ void Node3DEditorViewport::set_state(const Dictionary &p_state) { previewing = Object::cast_to<Camera3D>(pv); previewing->connect("tree_exiting", callable_mp(this, &Node3DEditorViewport::_preview_exited_scene)); RS::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(); |