Skip to content

Commit c33c3fe

Browse files
committed
Remove pointless _3D_DISABLED checks in editor code
1 parent 97241ff commit c33c3fe

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

editor/gui/editor_run_bar.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
#include "scene/gui/menu_button.h"
4848
#include "scene/gui/panel_container.h"
4949

50-
#ifndef _3D_DISABLED
50+
#ifndef XR_DISABLED
5151
#include "servers/xr_server.h"
52-
#endif // _3D_DISABLED
52+
#endif // XR_DISABLED
5353

5454
EditorRunBar *EditorRunBar::singleton = nullptr;
5555

editor/plugins/game_view_plugin.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ void GameViewDebugger::_session_started(Ref<EditorDebuggerSession> p_session) {
6767
settings["canvas_item_editor/pan_view"] = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("canvas_item_editor/pan_view"));
6868
settings["box_selection_fill_color"] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("box_selection_fill_color"), EditorStringName(Editor));
6969
settings["box_selection_stroke_color"] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("box_selection_stroke_color"), EditorStringName(Editor));
70-
#ifndef _3D_DISABLED
7170
settings["editors/3d/default_fov"] = EDITOR_GET("editors/3d/default_fov");
7271
settings["editors/3d/default_z_near"] = EDITOR_GET("editors/3d/default_z_near");
7372
settings["editors/3d/default_z_far"] = EDITOR_GET("editors/3d/default_z_far");
@@ -80,7 +79,6 @@ void GameViewDebugger::_session_started(Ref<EditorDebuggerSession> p_session) {
8079
settings["editors/3d/navigation_feel/translation_sensitivity"] = EDITOR_GET("editors/3d/navigation_feel/translation_sensitivity");
8180
settings["editors/3d/selection_box_color"] = EDITOR_GET("editors/3d/selection_box_color");
8281
settings["editors/3d/freelook/freelook_base_speed"] = EDITOR_GET("editors/3d/freelook/freelook_base_speed");
83-
#endif // _3D_DISABLED
8482

8583
Array setup_data;
8684
setup_data.append(settings);
@@ -656,9 +654,7 @@ void GameView::_notification(int p_what) {
656654

657655
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_button_icon(get_editor_theme_icon(SNAME("InputEventJoypadMotion")));
658656
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_button_icon(get_editor_theme_icon(SNAME("2DNodes")));
659-
#ifndef _3D_DISABLED
660657
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
661-
#endif // _3D_DISABLED
662658

663659
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
664660
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->set_button_icon(get_editor_theme_icon(SNAME("ListSelect")));
@@ -937,15 +933,13 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
937933
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_2D));
938934
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_tooltip_text(TTR("Disable game input and allow to select Node2Ds, Controls, and manipulate the 2D camera."));
939935

940-
#ifndef _3D_DISABLED
941936
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D] = memnew(Button);
942937
main_menu_hbox->add_child(node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]);
943938
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_text(TTR("3D"));
944939
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_toggle_mode(true);
945940
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_theme_type_variation(SceneStringName(FlatButton));
946941
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_3D));
947942
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_tooltip_text(TTR("Disable game input and allow to select Node3Ds and manipulate the 3D camera."));
948-
#endif // _3D_DISABLED
949943

950944
main_menu_hbox->add_child(memnew(VSeparator));
951945

0 commit comments

Comments
 (0)