Merge pull request #104390 from YeldhamDev/you_will_never_take_my_3d_away
Remove pointless `_3D_DISABLED` checks in editor code
This commit is contained in:
commit
1d664d996d
@ -47,9 +47,9 @@
|
||||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
#ifndef XR_DISABLED
|
||||
#include "servers/xr_server.h"
|
||||
#endif // _3D_DISABLED
|
||||
#endif // XR_DISABLED
|
||||
|
||||
EditorRunBar *EditorRunBar::singleton = nullptr;
|
||||
|
||||
|
@ -67,7 +67,6 @@ void GameViewDebugger::_session_started(Ref<EditorDebuggerSession> p_session) {
|
||||
settings["canvas_item_editor/pan_view"] = DebuggerMarshalls::serialize_key_shortcut(ED_GET_SHORTCUT("canvas_item_editor/pan_view"));
|
||||
settings["box_selection_fill_color"] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("box_selection_fill_color"), EditorStringName(Editor));
|
||||
settings["box_selection_stroke_color"] = EditorNode::get_singleton()->get_editor_theme()->get_color(SNAME("box_selection_stroke_color"), EditorStringName(Editor));
|
||||
#ifndef _3D_DISABLED
|
||||
settings["editors/3d/default_fov"] = EDITOR_GET("editors/3d/default_fov");
|
||||
settings["editors/3d/default_z_near"] = EDITOR_GET("editors/3d/default_z_near");
|
||||
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) {
|
||||
settings["editors/3d/navigation_feel/translation_sensitivity"] = EDITOR_GET("editors/3d/navigation_feel/translation_sensitivity");
|
||||
settings["editors/3d/selection_box_color"] = EDITOR_GET("editors/3d/selection_box_color");
|
||||
settings["editors/3d/freelook/freelook_base_speed"] = EDITOR_GET("editors/3d/freelook/freelook_base_speed");
|
||||
#endif // _3D_DISABLED
|
||||
|
||||
Array setup_data;
|
||||
setup_data.append(settings);
|
||||
@ -656,9 +654,7 @@ void GameView::_notification(int p_what) {
|
||||
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_NONE]->set_button_icon(get_editor_theme_icon(SNAME("InputEventJoypadMotion")));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->set_button_icon(get_editor_theme_icon(SNAME("2DNodes")));
|
||||
#ifndef _3D_DISABLED
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
|
||||
#endif // _3D_DISABLED
|
||||
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_SINGLE]->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
|
||||
select_mode_button[RuntimeNodeSelect::SELECT_MODE_LIST]->set_button_icon(get_editor_theme_icon(SNAME("ListSelect")));
|
||||
@ -937,7 +933,6 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_2D]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_2D));
|
||||
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."));
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D] = memnew(Button);
|
||||
main_menu_hbox->add_child(node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]);
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_text(TTR("3D"));
|
||||
@ -945,7 +940,6 @@ GameView::GameView(Ref<GameViewDebugger> p_debugger, WindowWrapper *p_wrapper) {
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_theme_type_variation(SceneStringName(FlatButton));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->connect(SceneStringName(pressed), callable_mp(this, &GameView::_node_type_pressed).bind(RuntimeNodeSelect::NODE_TYPE_3D));
|
||||
node_type_button[RuntimeNodeSelect::NODE_TYPE_3D]->set_tooltip_text(TTR("Disable game input and allow to select Node3Ds and manipulate the 3D camera."));
|
||||
#endif // _3D_DISABLED
|
||||
|
||||
main_menu_hbox->add_child(memnew(VSeparator));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user