summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2023-01-29 16:04:39 -0800
committerclayjohn <claynjohn@gmail.com>2023-01-30 12:25:49 -0800
commit90718090210f9fc2a81cb00c99a74c18b3694e34 (patch)
tree47c4f9a2a1eead96217a9d441578f0f95e8d66ef /editor/plugins
parent1a37aefbf9fbac494294f00e675f665a5f44c347 (diff)
Remove viewport_set_disable_environment in favor of viewport_set_environment_mode
This allows us to set a default value inherited by child viewports and have child viewports set the value themselves which is needed for disabling the environment in the editor
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index e09636d297..0f9ce89f02 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5401,11 +5401,13 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
canvas_item_editor->show();
canvas_item_editor->set_physics_process(true);
RenderingServer::get_singleton()->viewport_set_disable_2d(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), false);
+ RenderingServer::get_singleton()->viewport_set_environment_mode(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), RS::VIEWPORT_ENVIRONMENT_ENABLED);
} else {
canvas_item_editor->hide();
canvas_item_editor->set_physics_process(false);
RenderingServer::get_singleton()->viewport_set_disable_2d(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), true);
+ RenderingServer::get_singleton()->viewport_set_environment_mode(EditorNode::get_singleton()->get_scene_root()->get_viewport_rid(), RS::VIEWPORT_ENVIRONMENT_DISABLED);
}
}