From 85b45fd58efd9f4351b0f901aa7883de95a59925 Mon Sep 17 00:00:00 2001 From: Allen Pestaluky Date: Mon, 23 Mar 2026 10:58:28 -0400 Subject: [PATCH] Hide renderer selector in main editor window and add editor setting to show it. --- doc/classes/EditorSettings.xml | 3 +++ editor/editor_node.cpp | 4 +++- editor/settings/editor_settings.cpp | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index ea411e9843..5327a2f017 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -959,6 +959,9 @@ The preferred monitor to display the project manager. + + If [code]true[/code], a renderer selector that can be used to change the [member ProjectSettings.rendering/renderer/rendering_method] project setting will be shown in the top right of the main editor window. + If enabled, displays an icon in the top-right corner of the editor that spins when the editor redraws a frame. This can be used to diagnose situations where the engine is constantly redrawing, which should be avoided as this increases CPU and GPU utilization for no good reason. To further troubleshoot these situations, start the editor with the [code]--debug-canvas-item-redraw[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. Consider enabling this if you are developing editor plugins to ensure they only make the editor redraw when required. diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 030e367fe3..1ce3d616e2 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1153,6 +1153,7 @@ void EditorNode::_notification(int p_what) { if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/appearance")) { _update_update_spinner(); _update_main_menu_type(); + renderer->set_visible(EDITOR_GET("interface/editor/appearance/show_renderer_selector")); } if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor/display")) { _update_vsync_mode(); @@ -8990,7 +8991,6 @@ EditorNode::EditorNode() { title_bar->add_child(right_menu_hb); renderer = memnew(OptionButton); - renderer->set_visible(true); renderer->set_flat(true); renderer->set_theme_type_variation("TopBarOptionButton"); renderer->set_fit_to_longest_item(false); @@ -9036,6 +9036,8 @@ EditorNode::EditorNode() { } _update_renderer_color(); + renderer->set_visible(EDITOR_GET("interface/editor/appearance/show_renderer_selector")); + progress_hb = memnew(BackgroundProgress); layout_dialog = memnew(EditorLayoutsDialog); diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp index f0d500b7ce..ea66728a81 100644 --- a/editor/settings/editor_settings.cpp +++ b/editor/settings/editor_settings.cpp @@ -566,6 +566,8 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { #endif EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/appearance/collapse_main_menu", is_android_editor, "") + EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/editor/appearance/show_renderer_selector", false, "") + _initial_set("interface/editors/derive_script_globals_by_name", true); _initial_set("docks/scene_tree/ask_before_revoking_unique_name", true);