summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/config/project_settings.cpp1
-rw-r--r--core/core_bind.cpp1
-rw-r--r--core/debugger/local_debugger.cpp1
-rw-r--r--core/math/aabb.h22
-rw-r--r--core/math/basis.cpp114
-rw-r--r--core/math/color.cpp54
-rw-r--r--core/math/color.h28
-rw-r--r--core/math/face3.cpp8
-rw-r--r--core/math/face3.h4
-rw-r--r--core/math/geometry_2d.cpp2
-rw-r--r--core/math/geometry_2d.h26
-rw-r--r--core/math/geometry_3d.cpp18
-rw-r--r--core/math/geometry_3d.h56
-rw-r--r--core/math/math_funcs.h4
-rw-r--r--core/math/plane.cpp4
-rw-r--r--core/math/quaternion.cpp24
-rw-r--r--core/math/quaternion.h12
-rw-r--r--core/math/rect2.h10
-rw-r--r--core/math/transform_2d.cpp10
-rw-r--r--core/math/triangulate.cpp8
-rw-r--r--core/math/vector2.cpp10
-rw-r--r--core/math/vector2.h2
-rw-r--r--core/math/vector3.cpp8
-rw-r--r--core/math/vector3.h20
-rw-r--r--core/os/midi_driver.cpp1
-rw-r--r--core/os/os.h1
-rw-r--r--core/os/threaded_array_processor.h1
-rw-r--r--core/variant/typed_array.h2
-rw-r--r--editor/action_map_editor.cpp1
-rw-r--r--editor/action_map_editor.h2
-rw-r--r--editor/animation_bezier_editor.cpp2
-rw-r--r--editor/animation_track_editor.cpp4
-rw-r--r--editor/animation_track_editor.h1
-rw-r--r--editor/animation_track_editor_plugins.cpp4
-rw-r--r--editor/array_property_edit.cpp2
-rw-r--r--editor/code_editor.cpp4
-rw-r--r--editor/connections_dialog.cpp7
-rw-r--r--editor/create_dialog.cpp8
-rw-r--r--editor/create_dialog.h2
-rw-r--r--editor/debugger/editor_debugger_node.cpp1
-rw-r--r--editor/debugger/editor_debugger_tree.cpp2
-rw-r--r--editor/debugger/script_editor_debugger.cpp1
-rw-r--r--editor/debugger/script_editor_debugger.h2
-rw-r--r--editor/dependency_editor.cpp7
-rw-r--r--editor/dependency_editor.h2
-rw-r--r--editor/dictionary_property_edit.cpp2
-rw-r--r--editor/editor_about.cpp2
-rw-r--r--editor/editor_about.h3
-rw-r--r--editor/editor_asset_installer.cpp5
-rw-r--r--editor/editor_audio_buses.cpp6
-rw-r--r--editor/editor_audio_buses.h3
-rw-r--r--editor/editor_autoload_settings.cpp5
-rw-r--r--editor/editor_autoload_settings.h4
-rw-r--r--editor/editor_data.cpp4
-rw-r--r--editor/editor_dir_dialog.cpp2
-rw-r--r--editor/editor_export.cpp4
-rw-r--r--editor/editor_feature_profile.cpp5
-rw-r--r--editor/editor_feature_profile.h3
-rw-r--r--editor/editor_file_dialog.cpp9
-rw-r--r--editor/editor_file_system.cpp6
-rw-r--r--editor/editor_folding.cpp4
-rw-r--r--editor/editor_fonts.cpp4
-rw-r--r--editor/editor_help.cpp6
-rw-r--r--editor/editor_help_search.cpp6
-rw-r--r--editor/editor_inspector.cpp8
-rw-r--r--editor/editor_locale_dialog.cpp1
-rw-r--r--editor/editor_log.cpp4
-rw-r--r--editor/editor_log.h1
-rw-r--r--editor/editor_node.cpp5
-rw-r--r--editor/editor_node.h21
-rw-r--r--editor/editor_path.cpp4
-rw-r--r--editor/editor_path.h2
-rw-r--r--editor/editor_plugin.cpp3
-rw-r--r--editor/editor_plugin_settings.cpp4
-rw-r--r--editor/editor_plugin_settings.h2
-rw-r--r--editor/editor_properties.cpp8
-rw-r--r--editor/editor_properties_array_dict.cpp2
-rw-r--r--editor/editor_resource_picker.cpp10
-rw-r--r--editor/editor_resource_picker.h3
-rw-r--r--editor/editor_resource_preview.cpp6
-rw-r--r--editor/editor_run.cpp2
-rw-r--r--editor/editor_run_native.cpp6
-rw-r--r--editor/editor_run_script.cpp2
-rw-r--r--editor/editor_run_script.h2
-rw-r--r--editor/editor_sectioned_inspector.cpp2
-rw-r--r--editor/editor_settings_dialog.cpp10
-rw-r--r--editor/editor_settings_dialog.h2
-rw-r--r--editor/editor_spin_slider.cpp4
-rw-r--r--editor/editor_themes.cpp8
-rw-r--r--editor/editor_toaster.cpp5
-rw-r--r--editor/editor_toaster.h8
-rw-r--r--editor/export_template_manager.cpp4
-rw-r--r--editor/filesystem_dock.cpp11
-rw-r--r--editor/filesystem_dock.h4
-rw-r--r--editor/find_in_files.cpp5
-rw-r--r--editor/groups_editor.cpp5
-rw-r--r--editor/import/dynamicfont_import_settings.cpp4
-rw-r--r--editor/import/dynamicfont_import_settings.h7
-rw-r--r--editor/import/editor_import_plugin.cpp1
-rw-r--r--editor/import/resource_importer_layered_texture.cpp3
-rw-r--r--editor/import/resource_importer_texture.cpp1
-rw-r--r--editor/import/scene_import_settings.cpp5
-rw-r--r--editor/import/scene_import_settings.h4
-rw-r--r--editor/import_defaults_editor.cpp9
-rw-r--r--editor/import_defaults_editor.h11
-rw-r--r--editor/import_dock.cpp8
-rw-r--r--editor/inspector_dock.cpp2
-rw-r--r--editor/inspector_dock.h2
-rw-r--r--editor/localization_editor.cpp10
-rw-r--r--editor/localization_editor.h5
-rw-r--r--editor/multi_node_edit.cpp2
-rw-r--r--editor/node_dock.cpp4
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp1
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.h3
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp2
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.h1
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp2
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.h1
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.h3
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp3
-rw-r--r--editor/plugins/animation_player_editor_plugin.h4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp2
-rw-r--r--editor/plugins/animation_state_machine_editor.h3
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h3
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp1
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp1
-rw-r--r--editor/plugins/audio_stream_editor_plugin.h2
-rw-r--r--editor/plugins/camera_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/camera_3d_editor_plugin.h3
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h4
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp1
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h2
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.h7
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.cpp3
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.h2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp1
-rw-r--r--editor/plugins/curve_editor_plugin.h3
-rw-r--r--editor/plugins/editor_preview_plugins.cpp1
-rw-r--r--editor/plugins/font_editor_plugin.cpp1
-rw-r--r--editor/plugins/font_editor_plugin.h3
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.cpp3
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.h6
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.h4
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp3
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.h5
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp1
-rw-r--r--editor/plugins/gradient_editor_plugin.h3
-rw-r--r--editor/plugins/input_event_editor_plugin.cpp2
-rw-r--r--editor/plugins/input_event_editor_plugin.h3
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.cpp3
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.h5
-rw-r--r--editor/plugins/material_editor_plugin.cpp1
-rw-r--r--editor/plugins/material_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp1
-rw-r--r--editor/plugins/mesh_editor_plugin.h3
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.h3
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp1
-rw-r--r--editor/plugins/mesh_library_editor_plugin.h7
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp2
-rw-r--r--editor/plugins/multimesh_editor_plugin.h5
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/node_3d_editor_plugin.h7
-rw-r--r--editor/plugins/occluder_instance_3d_editor_plugin.cpp3
-rw-r--r--editor/plugins/occluder_instance_3d_editor_plugin.h5
-rw-r--r--editor/plugins/ot_features_plugin.cpp1
-rw-r--r--editor/plugins/ot_features_plugin.h3
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp1
-rw-r--r--editor/plugins/path_2d_editor_plugin.h3
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/path_3d_editor_plugin.h3
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.h7
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp3
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h3
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.h2
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp2
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h6
-rw-r--r--editor/plugins/script_editor_plugin.cpp1
-rw-r--r--editor/plugins/script_editor_plugin.h4
-rw-r--r--editor/plugins/script_text_editor.cpp1
-rw-r--r--editor/plugins/shader_file_editor_plugin.h2
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp1
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.h3
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.h2
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.h2
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.h3
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp3
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h10
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp1
-rw-r--r--editor/plugins/style_box_editor_plugin.h4
-rw-r--r--editor/plugins/sub_viewport_preview_editor_plugin.cpp2
-rw-r--r--editor/plugins/sub_viewport_preview_editor_plugin.h3
-rw-r--r--editor/plugins/text_control_editor_plugin.cpp1
-rw-r--r--editor/plugins/text_control_editor_plugin.h4
-rw-r--r--editor/plugins/texture_3d_editor_plugin.cpp1
-rw-r--r--editor/plugins/texture_3d_editor_plugin.h4
-rw-r--r--editor/plugins/texture_editor_plugin.cpp1
-rw-r--r--editor/plugins/texture_editor_plugin.h3
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp1
-rw-r--r--editor/plugins/texture_layered_editor_plugin.h4
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp1
-rw-r--r--editor/plugins/texture_region_editor_plugin.h2
-rw-r--r--editor/plugins/theme_editor_plugin.cpp2
-rw-r--r--editor/plugins/theme_editor_plugin.h9
-rw-r--r--editor/plugins/theme_editor_preview.cpp8
-rw-r--r--editor/plugins/theme_editor_preview.h16
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.cpp4
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.h6
-rw-r--r--editor/plugins/tiles/tile_atlas_view.cpp1
-rw-r--r--editor/plugins/tiles/tile_atlas_view.h2
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp13
-rw-r--r--editor/plugins/tiles/tile_data_editors.h14
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp11
-rw-r--r--editor/plugins/tiles/tile_map_editor.h17
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.cpp3
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.h5
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp3
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.h4
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp3
-rw-r--r--editor/plugins/tiles/tile_set_editor.h3
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp4
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.h9
-rw-r--r--editor/plugins/version_control_editor_plugin.h3
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp1
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h3
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.cpp3
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.h5
-rw-r--r--editor/pot_generator.cpp2
-rw-r--r--editor/progress_dialog.cpp2
-rw-r--r--editor/project_export.cpp8
-rw-r--r--editor/project_export.h2
-rw-r--r--editor/project_manager.cpp8
-rw-r--r--editor/project_settings_editor.h3
-rw-r--r--editor/property_editor.cpp2
-rw-r--r--editor/property_editor.h4
-rw-r--r--editor/property_selector.cpp2
-rw-r--r--editor/property_selector.h2
-rw-r--r--editor/quick_open.h2
-rw-r--r--editor/rename_dialog.cpp8
-rw-r--r--editor/scene_tree_dock.cpp1
-rw-r--r--editor/scene_tree_editor.cpp1
-rw-r--r--editor/scene_tree_editor.h4
-rw-r--r--editor/script_create_dialog.cpp3
-rw-r--r--editor/script_create_dialog.h3
-rw-r--r--editor/shader_create_dialog.cpp3
-rw-r--r--editor/shader_create_dialog.h3
-rw-r--r--editor/shader_globals_editor.cpp4
-rw-r--r--editor/shader_globals_editor.h1
-rw-r--r--misc/dist/html/editor.html2
-rw-r--r--misc/dist/html/manifest.json1
-rw-r--r--modules/csg/csg_gizmos.cpp2
-rw-r--r--modules/fbx/register_types.cpp2
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.cpp5
-rw-r--r--modules/gdnative/gdnative_library_editor_plugin.h9
-rw-r--r--modules/gdnative/gdnative_library_singleton_editor.cpp1
-rw-r--r--modules/gdscript/editor/gdscript_highlighter.cpp1
-rw-r--r--modules/gltf/editor_scene_exporter_gltf_plugin.cpp2
-rw-r--r--modules/gltf/editor_scene_exporter_gltf_plugin.h1
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp1
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h5
-rw-r--r--modules/mono/editor/editor_internal_calls.cpp1
-rw-r--r--modules/navigation/navigation_mesh_editor_plugin.cpp1
-rw-r--r--modules/navigation/navigation_mesh_editor_plugin.h2
-rw-r--r--platform/android/export/export_plugin.cpp2
-rw-r--r--platform/android/export/export_plugin.h1
-rw-r--r--platform/android/export/gradle_export_util.cpp2
-rw-r--r--platform/iphone/export/export_plugin.cpp2
-rw-r--r--platform/iphone/export/export_plugin.h1
-rw-r--r--platform/javascript/export/export_plugin.cpp3
-rw-r--r--platform/javascript/export/export_plugin.h4
-rw-r--r--platform/linuxbsd/os_linuxbsd.h2
-rw-r--r--platform/osx/export/export_plugin.cpp1
-rw-r--r--platform/osx/export/export_plugin.h1
-rw-r--r--platform/uwp/export/app_packager.cpp2
-rw-r--r--platform/uwp/export/app_packager.h1
-rw-r--r--platform/windows/export/export_plugin.cpp3
-rw-r--r--platform/windows/export/export_plugin.h1
-rw-r--r--platform/windows/os_windows.h2
-rw-r--r--scene/2d/audio_stream_player_2d.cpp1
-rw-r--r--scene/2d/camera_2d.cpp1
-rw-r--r--scene/2d/collision_object_2d.cpp1
-rw-r--r--scene/2d/navigation_agent_2d.cpp1
-rw-r--r--scene/2d/navigation_obstacle_2d.cpp1
-rw-r--r--scene/2d/navigation_region_2d.cpp1
-rw-r--r--scene/2d/ray_cast_2d.cpp1
-rw-r--r--scene/2d/shape_cast_2d.h1
-rw-r--r--scene/2d/skeleton_2d.cpp1
-rw-r--r--scene/2d/tile_map.cpp2
-rw-r--r--scene/3d/camera_3d.h2
-rw-r--r--scene/3d/node_3d.h1
-rw-r--r--scene/3d/occluder_instance_3d.cpp2
-rw-r--r--scene/3d/xr_nodes.cpp1
-rw-r--r--scene/gui/base_button.h1
-rw-r--r--scene/gui/control.h2
-rw-r--r--scene/gui/flow_container.cpp2
-rw-r--r--scene/gui/flow_container.h2
-rw-r--r--scene/gui/graph_edit.h2
-rw-r--r--scene/gui/link_button.h1
-rw-r--r--scene/gui/popup_menu.cpp1
-rw-r--r--scene/gui/scroll_container.cpp2
-rw-r--r--scene/main/canvas_item.h2
-rw-r--r--scene/main/canvas_layer.cpp6
-rw-r--r--scene/main/node.cpp1
-rw-r--r--scene/main/node.h3
-rw-r--r--scene/main/scene_tree.cpp3
-rw-r--r--scene/main/scene_tree.h3
-rw-r--r--scene/main/viewport.cpp1
-rw-r--r--scene/main/window.cpp1
-rw-r--r--scene/resources/environment.h1
-rw-r--r--scene/resources/skeleton_modification_2d_jiggle.cpp2
-rw-r--r--scene/resources/theme.cpp1
-rw-r--r--scene/resources/theme.h1
-rw-r--r--scene/resources/world_2d.h2
-rw-r--r--scene/resources/world_3d.cpp2
-rw-r--r--servers/rendering/rasterizer_dummy.h1
-rw-r--r--servers/rendering/renderer_compositor.h4
-rw-r--r--servers/rendering/renderer_scene.h2
-rw-r--r--servers/rendering/renderer_scene_cull.h11
-rw-r--r--servers/rendering/renderer_scene_render.h1
-rw-r--r--tests/test_main.cpp9
331 files changed, 887 insertions, 574 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 887051f18f..3a7fc828aa 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -39,7 +39,6 @@
#include "core/io/file_access_pack.h"
#include "core/io/marshalls.h"
#include "core/os/keyboard.h"
-#include "core/os/os.h"
#include "core/variant/variant_parser.h"
#include "core/version.h"
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 195292f7e6..b31cc18b7a 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -39,7 +39,6 @@
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
#include "core/os/keyboard.h"
-#include "core/os/os.h"
namespace core_bind {
diff --git a/core/debugger/local_debugger.cpp b/core/debugger/local_debugger.cpp
index 61d75a6a0d..c9f7d81a90 100644
--- a/core/debugger/local_debugger.cpp
+++ b/core/debugger/local_debugger.cpp
@@ -31,7 +31,6 @@
#include "local_debugger.h"
#include "core/debugger/script_debugger.h"
-#include "core/os/os.h"
#include "scene/main/scene_tree.h"
struct LocalDebugger::ScriptsProfiler {
diff --git a/core/math/aabb.h b/core/math/aabb.h
index cb6f05e9ea..e88ba33531 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -119,7 +119,7 @@ struct _NO_DISCARD_ AABB {
}
_FORCE_INLINE_ Vector3 get_center() const {
- return position + (size * 0.5);
+ return position + (size * 0.5f);
}
operator String() const;
@@ -208,7 +208,7 @@ inline bool AABB::encloses(const AABB &p_aabb) const {
}
Vector3 AABB::get_support(const Vector3 &p_normal) const {
- Vector3 half_extents = size * 0.5;
+ Vector3 half_extents = size * 0.5f;
Vector3 ofs = position + half_extents;
return Vector3(
@@ -242,7 +242,7 @@ Vector3 AABB::get_endpoint(int p_point) const {
}
bool AABB::intersects_convex_shape(const Plane *p_planes, int p_plane_count, const Vector3 *p_points, int p_point_count) const {
- Vector3 half_extents = size * 0.5;
+ Vector3 half_extents = size * 0.5f;
Vector3 ofs = position + half_extents;
for (int i = 0; i < p_plane_count; i++) {
@@ -284,7 +284,7 @@ bool AABB::intersects_convex_shape(const Plane *p_planes, int p_plane_count, con
}
bool AABB::inside_convex_shape(const Plane *p_planes, int p_plane_count) const {
- Vector3 half_extents = size * 0.5;
+ Vector3 half_extents = size * 0.5f;
Vector3 ofs = position + half_extents;
for (int i = 0; i < p_plane_count; i++) {
@@ -364,7 +364,7 @@ inline void AABB::expand_to(const Vector3 &p_vector) {
}
void AABB::project_range_in_plane(const Plane &p_plane, real_t &r_min, real_t &r_max) const {
- Vector3 half_extents(size.x * 0.5, size.y * 0.5, size.z * 0.5);
+ Vector3 half_extents(size.x * 0.5f, size.y * 0.5f, size.z * 0.5f);
Vector3 center(position.x + half_extents.x, position.y + half_extents.y, position.z + half_extents.z);
real_t length = p_plane.normal.abs().dot(half_extents);
@@ -407,9 +407,9 @@ bool AABB::smits_intersect_ray(const Vector3 &p_from, const Vector3 &p_dir, real
ERR_PRINT("AABB size is negative, this is not supported. Use AABB.abs() to get an AABB with a positive size.");
}
#endif
- real_t divx = 1.0 / p_dir.x;
- real_t divy = 1.0 / p_dir.y;
- real_t divz = 1.0 / p_dir.z;
+ real_t divx = 1.0f / p_dir.x;
+ real_t divy = 1.0f / p_dir.y;
+ real_t divz = 1.0f / p_dir.z;
Vector3 upbound = position + size;
real_t tmin, tmax, tymin, tymax, tzmin, tzmax;
@@ -459,9 +459,9 @@ void AABB::grow_by(real_t p_amount) {
position.x -= p_amount;
position.y -= p_amount;
position.z -= p_amount;
- size.x += 2.0 * p_amount;
- size.y += 2.0 * p_amount;
- size.z += 2.0 * p_amount;
+ size.x += 2.0f * p_amount;
+ size.y += 2.0f * p_amount;
+ size.z += 2.0f * p_amount;
}
void AABB::quantize(real_t p_unit) {
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index a9b4651664..e34c1c1315 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -40,13 +40,13 @@ void Basis::from_z(const Vector3 &p_z) {
if (Math::abs(p_z.z) > Math_SQRT12) {
// choose p in y-z plane
real_t a = p_z[1] * p_z[1] + p_z[2] * p_z[2];
- real_t k = 1.0 / Math::sqrt(a);
+ real_t k = 1.0f / Math::sqrt(a);
elements[0] = Vector3(0, -p_z[2] * k, p_z[1] * k);
elements[1] = Vector3(a * k, -p_z[0] * elements[0][2], p_z[0] * elements[0][1]);
} else {
// choose p in x-y plane
real_t a = p_z.x * p_z.x + p_z.y * p_z.y;
- real_t k = 1.0 / Math::sqrt(a);
+ real_t k = 1.0f / Math::sqrt(a);
elements[0] = Vector3(-p_z.y * k, p_z.x * k, 0);
elements[1] = Vector3(-p_z.z * elements[0].y, p_z.z * elements[0].x, a * k);
}
@@ -63,7 +63,7 @@ void Basis::invert() {
#ifdef MATH_CHECKS
ERR_FAIL_COND(det == 0);
#endif
- real_t s = 1.0 / det;
+ real_t s = 1.0f / det;
set(co[0] * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s,
co[1] * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s,
@@ -182,7 +182,7 @@ Basis Basis::diagonalize() {
if (Math::is_equal_approx(elements[j][j], elements[i][i])) {
angle = Math_PI / 4;
} else {
- angle = 0.5 * Math::atan(2 * elements[i][j] / (elements[j][j] - elements[i][i]));
+ angle = 0.5f * Math::atan(2 * elements[i][j] / (elements[j][j] - elements[i][i]));
}
// Compute the rotation matrix
@@ -268,11 +268,11 @@ Basis Basis::scaled_orthogonal(const Vector3 &p_scale) const {
}
float Basis::get_uniform_scale() const {
- return (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0;
+ return (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0f;
}
void Basis::make_scale_uniform() {
- float l = (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0;
+ float l = (elements[0].length() + elements[1].length() + elements[2].length()) / 3.0f;
for (int i = 0; i < 3; i++) {
elements[i].normalize();
elements[i] *= l;
@@ -415,7 +415,7 @@ void Basis::rotate_to_align(Vector3 p_start_direction, Vector3 p_end_direction)
const Vector3 axis = p_start_direction.cross(p_end_direction).normalized();
if (axis.length_squared() != 0) {
real_t dot = p_start_direction.dot(p_end_direction);
- dot = CLAMP(dot, -1.0, 1.0);
+ dot = CLAMP(dot, -1.0f, 1.0f);
const real_t angle_rads = Math::acos(dot);
set_axis_angle(axis, angle_rads);
}
@@ -463,10 +463,10 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
Vector3 euler;
real_t sy = elements[0][2];
- if (sy < (1.0 - CMP_EPSILON)) {
- if (sy > -(1.0 - CMP_EPSILON)) {
+ if (sy < (1.0f - CMP_EPSILON)) {
+ if (sy > -(1.0f - CMP_EPSILON)) {
// is this a pure Y rotation?
- if (elements[1][0] == 0.0 && elements[0][1] == 0.0 && elements[1][2] == 0 && elements[2][1] == 0 && elements[1][1] == 1) {
+ if (elements[1][0] == 0 && elements[0][1] == 0 && elements[1][2] == 0 && elements[2][1] == 0 && elements[1][1] == 1) {
// return the simplest form (human friendlier in editor and scripts)
euler.x = 0;
euler.y = atan2(elements[0][2], elements[0][0]);
@@ -478,13 +478,13 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
}
} else {
euler.x = Math::atan2(elements[2][1], elements[1][1]);
- euler.y = -Math_PI / 2.0;
- euler.z = 0.0;
+ euler.y = -Math_PI / 2.0f;
+ euler.z = 0.0f;
}
} else {
euler.x = Math::atan2(elements[2][1], elements[1][1]);
- euler.y = Math_PI / 2.0;
- euler.z = 0.0;
+ euler.y = Math_PI / 2.0f;
+ euler.z = 0.0f;
}
return euler;
} break;
@@ -498,22 +498,22 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
Vector3 euler;
real_t sz = elements[0][1];
- if (sz < (1.0 - CMP_EPSILON)) {
- if (sz > -(1.0 - CMP_EPSILON)) {
+ if (sz < (1.0f - CMP_EPSILON)) {
+ if (sz > -(1.0f - CMP_EPSILON)) {
euler.x = Math::atan2(elements[2][1], elements[1][1]);
euler.y = Math::atan2(elements[0][2], elements[0][0]);
euler.z = Math::asin(-sz);
} else {
// It's -1
euler.x = -Math::atan2(elements[1][2], elements[2][2]);
- euler.y = 0.0;
- euler.z = Math_PI / 2.0;
+ euler.y = 0.0f;
+ euler.z = Math_PI / 2.0f;
}
} else {
// It's 1
euler.x = -Math::atan2(elements[1][2], elements[2][2]);
- euler.y = 0.0;
- euler.z = -Math_PI / 2.0;
+ euler.y = 0.0f;
+ euler.z = -Math_PI / 2.0f;
}
return euler;
} break;
@@ -543,12 +543,12 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
euler.z = atan2(elements[1][0], elements[1][1]);
}
} else { // m12 == -1
- euler.x = Math_PI * 0.5;
+ euler.x = Math_PI * 0.5f;
euler.y = atan2(elements[0][1], elements[0][0]);
euler.z = 0;
}
} else { // m12 == 1
- euler.x = -Math_PI * 0.5;
+ euler.x = -Math_PI * 0.5f;
euler.y = -atan2(elements[0][1], elements[0][0]);
euler.z = 0;
}
@@ -565,22 +565,22 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
Vector3 euler;
real_t sz = elements[1][0];
- if (sz < (1.0 - CMP_EPSILON)) {
- if (sz > -(1.0 - CMP_EPSILON)) {
+ if (sz < (1.0f - CMP_EPSILON)) {
+ if (sz > -(1.0f - CMP_EPSILON)) {
euler.x = Math::atan2(-elements[1][2], elements[1][1]);
euler.y = Math::atan2(-elements[2][0], elements[0][0]);
euler.z = Math::asin(sz);
} else {
// It's -1
euler.x = Math::atan2(elements[2][1], elements[2][2]);
- euler.y = 0.0;
- euler.z = -Math_PI / 2.0;
+ euler.y = 0.0f;
+ euler.z = -Math_PI / 2.0f;
}
} else {
// It's 1
euler.x = Math::atan2(elements[2][1], elements[2][2]);
- euler.y = 0.0;
- euler.z = Math_PI / 2.0;
+ euler.y = 0.0f;
+ euler.z = Math_PI / 2.0f;
}
return euler;
} break;
@@ -593,20 +593,20 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
// -cx*sy sx cx*cy
Vector3 euler;
real_t sx = elements[2][1];
- if (sx < (1.0 - CMP_EPSILON)) {
- if (sx > -(1.0 - CMP_EPSILON)) {
+ if (sx < (1.0f - CMP_EPSILON)) {
+ if (sx > -(1.0f - CMP_EPSILON)) {
euler.x = Math::asin(sx);
euler.y = Math::atan2(-elements[2][0], elements[2][2]);
euler.z = Math::atan2(-elements[0][1], elements[1][1]);
} else {
// It's -1
- euler.x = -Math_PI / 2.0;
+ euler.x = -Math_PI / 2.0f;
euler.y = Math::atan2(elements[0][2], elements[0][0]);
euler.z = 0;
}
} else {
// It's 1
- euler.x = Math_PI / 2.0;
+ euler.x = Math_PI / 2.0f;
euler.y = Math::atan2(elements[0][2], elements[0][0]);
euler.z = 0;
}
@@ -621,21 +621,21 @@ Vector3 Basis::get_euler(EulerOrder p_order) const {
// -sy cy*sx cy*cx
Vector3 euler;
real_t sy = elements[2][0];
- if (sy < (1.0 - CMP_EPSILON)) {
- if (sy > -(1.0 - CMP_EPSILON)) {
+ if (sy < (1.0f - CMP_EPSILON)) {
+ if (sy > -(1.0f - CMP_EPSILON)) {
euler.x = Math::atan2(elements[2][1], elements[2][2]);
euler.y = Math::asin(-sy);
euler.z = Math::atan2(elements[1][0], elements[0][0]);
} else {
// It's -1
euler.x = 0;
- euler.y = Math_PI / 2.0;
+ euler.y = Math_PI / 2.0f;
euler.z = -Math::atan2(elements[0][1], elements[1][1]);
}
} else {
// It's 1
euler.x = 0;
- euler.y = -Math_PI / 2.0;
+ euler.y = -Math_PI / 2.0f;
euler.z = -Math::atan2(elements[0][1], elements[1][1]);
}
return euler;
@@ -652,15 +652,15 @@ void Basis::set_euler(const Vector3 &p_euler, EulerOrder p_order) {
c = Math::cos(p_euler.x);
s = Math::sin(p_euler.x);
- Basis xmat(1.0, 0.0, 0.0, 0.0, c, -s, 0.0, s, c);
+ Basis xmat(1, 0, 0, 0, c, -s, 0, s, c);
c = Math::cos(p_euler.y);
s = Math::sin(p_euler.y);
- Basis ymat(c, 0.0, s, 0.0, 1.0, 0.0, -s, 0.0, c);
+ Basis ymat(c, 0, s, 0, 1, 0, -s, 0, c);
c = Math::cos(p_euler.z);
s = Math::sin(p_euler.z);
- Basis zmat(c, -s, 0.0, s, c, 0.0, 0.0, 0.0, 1.0);
+ Basis zmat(c, -s, 0, s, c, 0, 0, 0, 1);
switch (p_order) {
case EULER_ORDER_XYZ: {
@@ -722,10 +722,10 @@ Quaternion Basis::get_quaternion() const {
real_t trace = m.elements[0][0] + m.elements[1][1] + m.elements[2][2];
real_t temp[4];
- if (trace > 0.0) {
- real_t s = Math::sqrt(trace + 1.0);
- temp[3] = (s * 0.5);
- s = 0.5 / s;
+ if (trace > 0.0f) {
+ real_t s = Math::sqrt(trace + 1.0f);
+ temp[3] = (s * 0.5f);
+ s = 0.5f / s;
temp[0] = ((m.elements[2][1] - m.elements[1][2]) * s);
temp[1] = ((m.elements[0][2] - m.elements[2][0]) * s);
@@ -737,9 +737,9 @@ Quaternion Basis::get_quaternion() const {
int j = (i + 1) % 3;
int k = (i + 2) % 3;
- real_t s = Math::sqrt(m.elements[i][i] - m.elements[j][j] - m.elements[k][k] + 1.0);
- temp[i] = s * 0.5;
- s = 0.5 / s;
+ real_t s = Math::sqrt(m.elements[i][i] - m.elements[j][j] - m.elements[k][k] + 1.0f);
+ temp[i] = s * 0.5f;
+ s = 0.5f / s;
temp[3] = (m.elements[k][j] - m.elements[j][k]) * s;
temp[j] = (m.elements[j][i] + m.elements[i][j]) * s;
@@ -782,10 +782,10 @@ int Basis::get_orthogonal_index() const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
real_t v = orth[i][j];
- if (v > 0.5) {
- v = 1.0;
- } else if (v < -0.5) {
- v = -1.0;
+ if (v > 0.5f) {
+ v = 1.0f;
+ } else if (v < -0.5f) {
+ v = -1.0f;
} else {
v = 0;
}
@@ -890,14 +890,14 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
void Basis::set_quaternion(const Quaternion &p_quaternion) {
real_t d = p_quaternion.length_squared();
- real_t s = 2.0 / d;
+ real_t s = 2.0f / d;
real_t xs = p_quaternion.x * s, ys = p_quaternion.y * s, zs = p_quaternion.z * s;
real_t wx = p_quaternion.w * xs, wy = p_quaternion.w * ys, wz = p_quaternion.w * zs;
real_t xx = p_quaternion.x * xs, xy = p_quaternion.x * ys, xz = p_quaternion.x * zs;
real_t yy = p_quaternion.y * ys, yz = p_quaternion.y * zs, zz = p_quaternion.z * zs;
- set(1.0 - (yy + zz), xy - wz, xz + wy,
- xy + wz, 1.0 - (xx + zz), yz - wx,
- xz - wy, yz + wx, 1.0 - (xx + yy));
+ set(1.0f - (yy + zz), xy - wz, xz + wy,
+ xy + wz, 1.0f - (xx + zz), yz - wx,
+ xz - wy, yz + wx, 1.0f - (xx + yy));
}
void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_phi) {
@@ -907,9 +907,9 @@ void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_phi) {
#endif
Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z);
real_t cosine = Math::cos(p_phi);
- elements[0][0] = axis_sq.x + cosine * (1.0 - axis_sq.x);
- elements[1][1] = axis_sq.y + cosine * (1.0 - axis_sq.y);
- elements[2][2] = axis_sq.z + cosine * (1.0 - axis_sq.z);
+ elements[0][0] = axis_sq.x + cosine * (1.0f - axis_sq.x);
+ elements[1][1] = axis_sq.y + cosine * (1.0f - axis_sq.y);
+ elements[2][2] = axis_sq.z + cosine * (1.0f - axis_sq.z);
real_t sine = Math::sin(p_phi);
real_t t = 1 - cosine;
diff --git a/core/math/color.cpp b/core/math/color.cpp
index b06d20b3d3..e32f9147d9 100644
--- a/core/math/color.cpp
+++ b/core/math/color.cpp
@@ -161,9 +161,9 @@ float Color::get_h() const {
h = 4 + (r - g) / delta; // between magenta & cyan
}
- h /= 6.0;
+ h /= 6.0f;
if (h < 0) {
- h += 1.0;
+ h += 1.0f;
}
return h;
@@ -197,7 +197,7 @@ void Color::set_hsv(float p_h, float p_s, float p_v, float p_alpha) {
return;
}
- p_h *= 6.0;
+ p_h *= 6.0f;
p_h = Math::fmod(p_h, 6);
i = Math::floor(p_h);
@@ -253,31 +253,31 @@ Color Color::clamp(const Color &p_min, const Color &p_max) const {
}
void Color::invert() {
- r = 1.0 - r;
- g = 1.0 - g;
- b = 1.0 - b;
+ r = 1.0f - r;
+ g = 1.0f - g;
+ b = 1.0f - b;
}
Color Color::hex(uint32_t p_hex) {
- float a = (p_hex & 0xFF) / 255.0;
+ float a = (p_hex & 0xFF) / 255.0f;
p_hex >>= 8;
- float b = (p_hex & 0xFF) / 255.0;
+ float b = (p_hex & 0xFF) / 255.0f;
p_hex >>= 8;
- float g = (p_hex & 0xFF) / 255.0;
+ float g = (p_hex & 0xFF) / 255.0f;
p_hex >>= 8;
- float r = (p_hex & 0xFF) / 255.0;
+ float r = (p_hex & 0xFF) / 255.0f;
return Color(r, g, b, a);
}
Color Color::hex64(uint64_t p_hex) {
- float a = (p_hex & 0xFFFF) / 65535.0;
+ float a = (p_hex & 0xFFFF) / 65535.0f;
p_hex >>= 16;
- float b = (p_hex & 0xFFFF) / 65535.0;
+ float b = (p_hex & 0xFFFF) / 65535.0f;
p_hex >>= 16;
- float g = (p_hex & 0xFFFF) / 65535.0;
+ float g = (p_hex & 0xFFFF) / 65535.0f;
p_hex >>= 16;
- float r = (p_hex & 0xFFFF) / 65535.0;
+ float r = (p_hex & 0xFFFF) / 65535.0f;
return Color(r, g, b, a);
}
@@ -333,18 +333,18 @@ Color Color::html(const String &p_rgba) {
float r, g, b, a = 1.0;
if (is_shorthand) {
- r = _parse_col4(color, 0) / 15.0;
- g = _parse_col4(color, 1) / 15.0;
- b = _parse_col4(color, 2) / 15.0;
+ r = _parse_col4(color, 0) / 15.0f;
+ g = _parse_col4(color, 1) / 15.0f;
+ b = _parse_col4(color, 2) / 15.0f;
if (alpha) {
- a = _parse_col4(color, 3) / 15.0;
+ a = _parse_col4(color, 3) / 15.0f;
}
} else {
- r = _parse_col8(color, 0) / 255.0;
- g = _parse_col8(color, 2) / 255.0;
- b = _parse_col8(color, 4) / 255.0;
+ r = _parse_col8(color, 0) / 255.0f;
+ g = _parse_col8(color, 2) / 255.0f;
+ b = _parse_col8(color, 4) / 255.0f;
if (alpha) {
- a = _parse_col8(color, 6) / 255.0;
+ a = _parse_col8(color, 6) / 255.0f;
}
}
ERR_FAIL_COND_V_MSG(r < 0, Color(), "Invalid color code: " + p_rgba + ".");
@@ -458,7 +458,7 @@ Color Color::from_rgbe9995(uint32_t p_rgbe) {
float g = (p_rgbe >> 9) & 0x1ff;
float b = (p_rgbe >> 18) & 0x1ff;
float e = (p_rgbe >> 27);
- float m = Math::pow(2, e - 15.0 - 9.0);
+ float m = Math::pow(2, e - 15.0f - 9.0f);
float rd = r * m;
float gd = g * m;
@@ -563,8 +563,8 @@ void Color::operator/=(float p_scalar) {
Color Color::operator-() const {
return Color(
- 1.0 - r,
- 1.0 - g,
- 1.0 - b,
- 1.0 - a);
+ 1.0f - r,
+ 1.0f - g,
+ 1.0f - b,
+ 1.0f - a);
}
diff --git a/core/math/color.h b/core/math/color.h
index 72a4a5f8be..429807e4a6 100644
--- a/core/math/color.h
+++ b/core/math/color.h
@@ -95,7 +95,7 @@ struct _NO_DISCARD_ Color {
Color inverted() const;
_FORCE_INLINE_ float get_luminance() const {
- return 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ return 0.2126f * r + 0.7152f * g + 0.0722f * b;
}
_FORCE_INLINE_ Color lerp(const Color &p_to, float p_weight) const {
@@ -144,7 +144,7 @@ struct _NO_DISCARD_ Color {
float exps = expp + 1.0f;
- if (0.0 <= sMax && sMax < pow2to9) {
+ if (0.0f <= sMax && sMax < pow2to9) {
exps = expp;
}
@@ -157,7 +157,7 @@ struct _NO_DISCARD_ Color {
_FORCE_INLINE_ Color blend(const Color &p_over) const {
Color res;
- float sa = 1.0 - p_over.a;
+ float sa = 1.0f - p_over.a;
res.a = a * sa + p_over.a;
if (res.a == 0) {
return Color(0, 0, 0, 0);
@@ -171,16 +171,16 @@ struct _NO_DISCARD_ Color {
_FORCE_INLINE_ Color to_linear() const {
return Color(
- r < 0.04045 ? r * (1.0 / 12.92) : Math::pow((r + 0.055) * (1.0 / (1 + 0.055)), 2.4),
- g < 0.04045 ? g * (1.0 / 12.92) : Math::pow((g + 0.055) * (1.0 / (1 + 0.055)), 2.4),
- b < 0.04045 ? b * (1.0 / 12.92) : Math::pow((b + 0.055) * (1.0 / (1 + 0.055)), 2.4),
+ r < 0.04045f ? r * (1.0 / 12.92) : Math::pow((r + 0.055f) * (float)(1.0 / (1 + 0.055)), 2.4f),
+ g < 0.04045f ? g * (1.0 / 12.92) : Math::pow((g + 0.055f) * (float)(1.0 / (1 + 0.055)), 2.4f),
+ b < 0.04045f ? b * (1.0 / 12.92) : Math::pow((b + 0.055f) * (float)(1.0 / (1 + 0.055)), 2.4f),
a);
}
_FORCE_INLINE_ Color to_srgb() const {
return Color(
- r < 0.0031308 ? 12.92 * r : (1.0 + 0.055) * Math::pow(r, 1.0f / 2.4f) - 0.055,
- g < 0.0031308 ? 12.92 * g : (1.0 + 0.055) * Math::pow(g, 1.0f / 2.4f) - 0.055,
- b < 0.0031308 ? 12.92 * b : (1.0 + 0.055) * Math::pow(b, 1.0f / 2.4f) - 0.055, a);
+ r < 0.0031308f ? 12.92f * r : (1.0f + 0.055f) * Math::pow(r, 1.0f / 2.4f) - 0.055f,
+ g < 0.0031308f ? 12.92f * g : (1.0f + 0.055f) * Math::pow(g, 1.0f / 2.4f) - 0.055f,
+ b < 0.0031308f ? 12.92f * b : (1.0f + 0.055f) * Math::pow(b, 1.0f / 2.4f) - 0.055f, a);
}
static Color hex(uint32_t p_hex);
@@ -201,13 +201,13 @@ struct _NO_DISCARD_ Color {
operator String() const;
// For the binder.
- _FORCE_INLINE_ void set_r8(int32_t r8) { r = (CLAMP(r8, 0, 255) / 255.0); }
+ _FORCE_INLINE_ void set_r8(int32_t r8) { r = (CLAMP(r8, 0, 255) / 255.0f); }
_FORCE_INLINE_ int32_t get_r8() const { return int32_t(CLAMP(Math::round(r * 255.0f), 0.0f, 255.0f)); }
- _FORCE_INLINE_ void set_g8(int32_t g8) { g = (CLAMP(g8, 0, 255) / 255.0); }
+ _FORCE_INLINE_ void set_g8(int32_t g8) { g = (CLAMP(g8, 0, 255) / 255.0f); }
_FORCE_INLINE_ int32_t get_g8() const { return int32_t(CLAMP(Math::round(g * 255.0f), 0.0f, 255.0f)); }
- _FORCE_INLINE_ void set_b8(int32_t b8) { b = (CLAMP(b8, 0, 255) / 255.0); }
+ _FORCE_INLINE_ void set_b8(int32_t b8) { b = (CLAMP(b8, 0, 255) / 255.0f); }
_FORCE_INLINE_ int32_t get_b8() const { return int32_t(CLAMP(Math::round(b * 255.0f), 0.0f, 255.0f)); }
- _FORCE_INLINE_ void set_a8(int32_t a8) { a = (CLAMP(a8, 0, 255) / 255.0); }
+ _FORCE_INLINE_ void set_a8(int32_t a8) { a = (CLAMP(a8, 0, 255) / 255.0f); }
_FORCE_INLINE_ int32_t get_a8() const { return int32_t(CLAMP(Math::round(a * 255.0f), 0.0f, 255.0f)); }
_FORCE_INLINE_ void set_h(float p_h) { set_hsv(p_h, get_s(), get_v()); }
@@ -234,7 +234,7 @@ struct _NO_DISCARD_ Color {
r = p_r;
g = p_g;
b = p_b;
- a = 1.0;
+ a = 1.0f;
}
/**
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index d588f34e5d..9c968df19b 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -157,7 +157,7 @@ Vector3 Face3::get_random_point_inside() const {
SWAP(a, b);
}
- return vertex[0] * a + vertex[1] * (b - a) + vertex[2] * (1.0 - b);
+ return vertex[0] * a + vertex[1] * (b - a) + vertex[2] * (1.0f - b);
}
Plane Face3::get_plane(ClockDirection p_dir) const {
@@ -165,11 +165,11 @@ Plane Face3::get_plane(ClockDirection p_dir) const {
}
Vector3 Face3::get_median_point() const {
- return (vertex[0] + vertex[1] + vertex[2]) / 3.0;
+ return (vertex[0] + vertex[1] + vertex[2]) / 3.0f;
}
real_t Face3::get_area() const {
- return vec3_cross(vertex[0] - vertex[1], vertex[0] - vertex[2]).length() * 0.5;
+ return vec3_cross(vertex[0] - vertex[1], vertex[0] - vertex[2]).length() * 0.5f;
}
ClockDirection Face3::get_clock_dir() const {
@@ -223,7 +223,7 @@ bool Face3::intersects_aabb(const AABB &p_aabb) const {
Vector3 axis = vec3_cross(e1, e2);
- if (axis.length_squared() < 0.0001) {
+ if (axis.length_squared() < 0.0001f) {
continue; // coplanar
}
axis.normalize();
diff --git a/core/math/face3.h b/core/math/face3.h
index 8b123f078c..c61d6ad66e 100644
--- a/core/math/face3.h
+++ b/core/math/face3.h
@@ -95,7 +95,7 @@ struct _NO_DISCARD_ Face3 {
bool Face3::intersects_aabb2(const AABB &p_aabb) const {
Vector3 perp = (vertex[0] - vertex[2]).cross(vertex[0] - vertex[1]);
- Vector3 half_extents = p_aabb.size * 0.5;
+ Vector3 half_extents = p_aabb.size * 0.5f;
Vector3 ofs = p_aabb.position + half_extents;
Vector3 sup = Vector3(
@@ -206,7 +206,7 @@ bool Face3::intersects_aabb2(const AABB &p_aabb) const {
Vector3 axis = vec3_cross(e1, e2);
- if (axis.length_squared() < 0.0001) {
+ if (axis.length_squared() < 0.0001f) {
continue; // coplanar
}
//axis.normalize();
diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp
index 9fa45a3363..b1af91c49c 100644
--- a/core/math/geometry_2d.cpp
+++ b/core/math/geometry_2d.cpp
@@ -290,7 +290,7 @@ Vector<Vector<Point2>> Geometry2D::_polypath_offset(const Vector<Point2> &p_poly
et = etOpenRound;
break;
}
- ClipperOffset co(2.0, 0.25 * SCALE_FACTOR); // Defaults from ClipperOffset.
+ ClipperOffset co(2.0, 0.25f * SCALE_FACTOR); // Defaults from ClipperOffset.
Path path;
// Need to scale points (Clipper's requirement for robust computation).
diff --git a/core/math/geometry_2d.h b/core/math/geometry_2d.h
index a2881d5f60..4fdb8ee36a 100644
--- a/core/math/geometry_2d.h
+++ b/core/math/geometry_2d.h
@@ -61,21 +61,21 @@ public:
// First segment degenerates into a point.
s = 0.0;
t = f / e; // s = 0 => t = (b*s + f) / e = f / e
- t = CLAMP(t, 0.0, 1.0);
+ t = CLAMP(t, 0.0f, 1.0f);
} else {
real_t c = d1.dot(r);
if (e <= CMP_EPSILON) {
// Second segment degenerates into a point.
t = 0.0;
- s = CLAMP(-c / a, 0.0, 1.0); // t = 0 => s = (b*t - c) / a = -c / a
+ s = CLAMP(-c / a, 0.0f, 1.0f); // t = 0 => s = (b*t - c) / a = -c / a
} else {
// The general nondegenerate case starts here.
real_t b = d1.dot(d2);
real_t denom = a * e - b * b; // Always nonnegative.
// If segments not parallel, compute closest point on L1 to L2 and
// clamp to segment S1. Else pick arbitrary s (here 0).
- if (denom != 0.0) {
- s = CLAMP((b * f - c * e) / denom, 0.0, 1.0);
+ if (denom != 0.0f) {
+ s = CLAMP((b * f - c * e) / denom, 0.0f, 1.0f);
} else {
s = 0.0;
}
@@ -86,12 +86,12 @@ public:
//If t in [0,1] done. Else clamp t, recompute s for the new value
// of t using s = Dot((P2 + D2*t) - P1,D1) / Dot(D1,D1)= (t*b - c) / a
// and clamp s to [0, 1].
- if (t < 0.0) {
+ if (t < 0.0f) {
t = 0.0;
- s = CLAMP(-c / a, 0.0, 1.0);
- } else if (t > 1.0) {
+ s = CLAMP(-c / a, 0.0f, 1.0f);
+ } else if (t > 1.0f) {
t = 1.0;
- s = CLAMP((b - c) / a, 0.0, 1.0);
+ s = CLAMP((b - c) / a, 0.0f, 1.0f);
}
}
}
@@ -104,15 +104,15 @@ public:
Vector2 p = p_point - p_segment[0];
Vector2 n = p_segment[1] - p_segment[0];
real_t l2 = n.length_squared();
- if (l2 < 1e-20) {
+ if (l2 < 1e-20f) {
return p_segment[0]; // Both points are the same, just give any.
}
real_t d = n.dot(p) / l2;
- if (d <= 0.0) {
+ if (d <= 0.0f) {
return p_segment[0]; // Before first point.
- } else if (d >= 1.0) {
+ } else if (d >= 1.0f) {
return p_segment[1]; // After first point.
} else {
return p_segment[0] + n * d; // Inside.
@@ -137,7 +137,7 @@ public:
Vector2 p = p_point - p_segment[0];
Vector2 n = p_segment[1] - p_segment[0];
real_t l2 = n.length_squared();
- if (l2 < 1e-20) {
+ if (l2 < 1e-20f) {
return p_segment[0]; // Both points are the same, just give any.
}
@@ -198,7 +198,7 @@ public:
real_t ABpos = D.x + (C.x - D.x) * D.y / (D.y - C.y);
// Fail if segment C-D crosses line A-B outside of segment A-B.
- if (ABpos < 0 || ABpos > 1.0) {
+ if (ABpos < 0 || ABpos > 1.0f) {
return false;
}
diff --git a/core/math/geometry_3d.cpp b/core/math/geometry_3d.cpp
index a9ff46410e..7eeb37df46 100644
--- a/core/math/geometry_3d.cpp
+++ b/core/math/geometry_3d.cpp
@@ -124,8 +124,8 @@ static bool _connect_faces(_FaceClassify *p_faces, int len, int p_group) {
Vector3 vj2 = p_faces[j].face.vertex[l];
Vector3 vj1 = p_faces[j].face.vertex[(l + 1) % 3];
- if (vi1.distance_to(vj1) < 0.00001 &&
- vi2.distance_to(vj2) < 0.00001) {
+ if (vi1.distance_to(vj1) < 0.00001f &&
+ vi2.distance_to(vj2) < 0.00001f) {
if (p_faces[i].links[k].face != -1) {
ERR_PRINT("already linked\n");
error = true;
@@ -508,7 +508,7 @@ Vector<Face3> Geometry3D::wrap_geometry(Vector<Face3> p_array, real_t *p_error)
}
}
- global_aabb.grow_by(0.01); // Avoid numerical error.
+ global_aabb.grow_by(0.01f); // Avoid numerical error.
// Determine amount of cells in grid axis.
int div_x, div_y, div_z;
@@ -638,7 +638,7 @@ Geometry3D::MeshData Geometry3D::build_convex_mesh(const Vector<Plane> &p_planes
Vector3 ref = Vector3(0.0, 1.0, 0.0);
- if (ABS(p.normal.dot(ref)) > 0.95) {
+ if (ABS(p.normal.dot(ref)) > 0.95f) {
ref = Vector3(0.0, 0.0, 1.0); // Change axis.
}
@@ -663,7 +663,7 @@ Geometry3D::MeshData Geometry3D::build_convex_mesh(const Vector<Plane> &p_planes
Vector<Vector3> new_vertices;
Plane clip = p_planes[j];
- if (clip.normal.dot(p.normal) > 0.95) {
+ if (clip.normal.dot(p.normal) > 0.95f) {
continue;
}
@@ -716,7 +716,7 @@ Geometry3D::MeshData Geometry3D::build_convex_mesh(const Vector<Plane> &p_planes
for (int j = 0; j < vertices.size(); j++) {
int idx = -1;
for (int k = 0; k < mesh.vertices.size(); k++) {
- if (mesh.vertices[k].distance_to(vertices[j]) < 0.001) {
+ if (mesh.vertices[k].distance_to(vertices[j]) < 0.001f) {
idx = k;
break;
}
@@ -793,8 +793,8 @@ Vector<Plane> Geometry3D::build_cylinder_planes(real_t p_radius, real_t p_height
Vector3 axis;
axis[p_axis] = 1.0;
- planes.push_back(Plane(axis, p_height * 0.5));
- planes.push_back(Plane(-axis, p_height * 0.5));
+ planes.push_back(Plane(axis, p_height * 0.5f));
+ planes.push_back(Plane(-axis, p_height * 0.5f));
return planes;
}
@@ -853,7 +853,7 @@ Vector<Plane> Geometry3D::build_capsule_planes(real_t p_radius, real_t p_height,
for (int j = 1; j <= p_lats; j++) {
Vector3 plane_normal = normal.lerp(axis, j / (real_t)p_lats).normalized();
- Vector3 position = axis * p_height * 0.5 + plane_normal * p_radius;
+ Vector3 position = axis * p_height * 0.5f + plane_normal * p_radius;
planes.push_back(Plane(plane_normal, position));
planes.push_back(Plane(plane_normal * axis_neg, position * axis_neg));
}
diff --git a/core/math/geometry_3d.h b/core/math/geometry_3d.h
index 0f6ab5c716..482c7ea604 100644
--- a/core/math/geometry_3d.h
+++ b/core/math/geometry_3d.h
@@ -77,15 +77,15 @@ public:
// Compute the line parameters of the two closest points.
if (D < CMP_EPSILON) { // The lines are almost parallel.
- sN = 0.0; // Force using point P0 on segment S1
- sD = 1.0; // to prevent possible division by 0.0 later.
+ sN = 0.0f; // Force using point P0 on segment S1
+ sD = 1.0f; // to prevent possible division by 0.0 later.
tN = e;
tD = c;
} else { // Get the closest points on the infinite lines
sN = (b * e - c * d);
tN = (a * e - b * d);
- if (sN < 0.0) { // sc < 0 => the s=0 edge is visible.
- sN = 0.0;
+ if (sN < 0.0f) { // sc < 0 => the s=0 edge is visible.
+ sN = 0.0f;
tN = e;
tD = c;
} else if (sN > sD) { // sc > 1 => the s=1 edge is visible.
@@ -95,11 +95,11 @@ public:
}
}
- if (tN < 0.0) { // tc < 0 => the t=0 edge is visible.
- tN = 0.0;
+ if (tN < 0.0f) { // tc < 0 => the t=0 edge is visible.
+ tN = 0.0f;
// Recompute sc for this edge.
- if (-d < 0.0) {
- sN = 0.0;
+ if (-d < 0.0f) {
+ sN = 0.0f;
} else if (-d > a) {
sN = sD;
} else {
@@ -109,7 +109,7 @@ public:
} else if (tN > tD) { // tc > 1 => the t=1 edge is visible.
tN = tD;
// Recompute sc for this edge.
- if ((-d + b) < 0.0) {
+ if ((-d + b) < 0.0f) {
sN = 0;
} else if ((-d + b) > a) {
sN = sD;
@@ -119,8 +119,8 @@ public:
}
}
// Finally do the division to get sc and tc.
- sc = (Math::is_zero_approx(sN) ? 0.0 : sN / sD);
- tc = (Math::is_zero_approx(tN) ? 0.0 : tN / tD);
+ sc = (Math::is_zero_approx(sN) ? 0.0f : sN / sD);
+ tc = (Math::is_zero_approx(tN) ? 0.0f : tN / tD);
// Get the difference of the two closest points.
Vector3 dP = w + (sc * u) - (tc * v); // = S1(sc) - S2(tc)
@@ -137,12 +137,12 @@ public:
return false;
}
- real_t f = 1.0 / a;
+ real_t f = 1.0f / a;
Vector3 s = p_from - p_v0;
real_t u = f * s.dot(h);
- if (u < 0.0 || u > 1.0) {
+ if (u < 0.0f || u > 1.0f) {
return false;
}
@@ -150,7 +150,7 @@ public:
real_t v = f * p_dir.dot(q);
- if (v < 0.0 || u + v > 1.0) {
+ if (v < 0.0f || u + v > 1.0f) {
return false;
}
@@ -158,7 +158,7 @@ public:
// the intersection point is on the line.
real_t t = f * e2.dot(q);
- if (t > 0.00001) { // ray intersection
+ if (t > 0.00001f) { // ray intersection
if (r_res) {
*r_res = p_from + p_dir * t;
}
@@ -178,12 +178,12 @@ public:
return false;
}
- real_t f = 1.0 / a;
+ real_t f = 1.0f / a;
Vector3 s = p_from - p_v0;
real_t u = f * s.dot(h);
- if (u < 0.0 || u > 1.0) {
+ if (u < 0.0f || u > 1.0f) {
return false;
}
@@ -191,7 +191,7 @@ public:
real_t v = f * rel.dot(q);
- if (v < 0.0 || u + v > 1.0) {
+ if (v < 0.0f || u + v > 1.0f) {
return false;
}
@@ -199,7 +199,7 @@ public:
// the intersection point is on the line.
real_t t = f * e2.dot(q);
- if (t > CMP_EPSILON && t <= 1.0) { // Ray intersection.
+ if (t > CMP_EPSILON && t <= 1.0f) { // Ray intersection.
if (r_res) {
*r_res = p_from + rel * t;
}
@@ -260,7 +260,7 @@ public:
ERR_FAIL_COND_V(p_cylinder_axis < 0, false);
ERR_FAIL_COND_V(p_cylinder_axis > 2, false);
Vector3 cylinder_axis;
- cylinder_axis[p_cylinder_axis] = 1.0;
+ cylinder_axis[p_cylinder_axis] = 1.0f;
// First check if they are parallel.
Vector3 normal = (rel / rel_l);
@@ -271,7 +271,7 @@ public:
if (crs_l < CMP_EPSILON) {
Vector3 side_axis;
- side_axis[(p_cylinder_axis + 1) % 3] = 1.0; // Any side axis OK.
+ side_axis[(p_cylinder_axis + 1) % 3] = 1.0f; // Any side axis OK.
axis_dir = side_axis;
} else {
axis_dir = crs / crs_l;
@@ -288,7 +288,7 @@ public:
if (w2 < CMP_EPSILON) {
return false; // Avoid numerical error.
}
- Size2 size(Math::sqrt(w2), p_height * 0.5);
+ Size2 size(Math::sqrt(w2), p_height * 0.5f);
Vector3 side_dir = axis_dir.cross(cylinder_axis).normalized();
@@ -417,15 +417,15 @@ public:
Vector3 p = p_point - p_segment[0];
Vector3 n = p_segment[1] - p_segment[0];
real_t l2 = n.length_squared();
- if (l2 < 1e-20) {
+ if (l2 < 1e-20f) {
return p_segment[0]; // Both points are the same, just give any.
}
real_t d = n.dot(p) / l2;
- if (d <= 0.0) {
+ if (d <= 0.0f) {
return p_segment[0]; // Before first point.
- } else if (d >= 1.0) {
+ } else if (d >= 1.0f) {
return p_segment[1]; // After first point.
} else {
return p_segment[0] + n * d; // Inside.
@@ -436,7 +436,7 @@ public:
Vector3 p = p_point - p_segment[0];
Vector3 n = p_segment[1] - p_segment[0];
real_t l2 = n.length_squared();
- if (l2 < 1e-20) {
+ if (l2 < 1e-20f) {
return p_segment[0]; // Both points are the same, just give any.
}
@@ -907,9 +907,9 @@ public:
_FORCE_INLINE_ static Vector3 octahedron_map_decode(const Vector2 &p_uv) {
// https://twitter.com/Stubbesaurus/status/937994790553227264
- Vector2 f = p_uv * 2.0 - Vector2(1.0, 1.0);
+ Vector2 f = p_uv * 2.0f - Vector2(1.0f, 1.0f);
Vector3 n = Vector3(f.x, f.y, 1.0f - Math::abs(f.x) - Math::abs(f.y));
- float t = CLAMP(-n.z, 0.0, 1.0);
+ float t = CLAMP(-n.z, 0.0f, 1.0f);
n.x += n.x >= 0 ? -t : t;
n.y += n.y >= 0 ? -t : t;
return n.normalized();
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index f3d10c3f0d..6b5eb655d3 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -198,7 +198,7 @@ public:
if ((value < 0 && p_y > 0) || (value > 0 && p_y < 0)) {
value += p_y;
}
- value += 0.0;
+ value += 0.0f;
return value;
}
static _ALWAYS_INLINE_ float fposmodp(float p_x, float p_y) {
@@ -206,7 +206,7 @@ public:
if (value < 0) {
value += p_y;
}
- value += 0.0;
+ value += 0.0f;
return value;
}
static _ALWAYS_INLINE_ double fposmodp(double p_x, double p_y) {
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index 8bd4b5ef4f..0ce8aed51c 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -58,7 +58,7 @@ Vector3 Plane::get_any_perpendicular_normal() const {
static const Vector3 p2 = Vector3(0, 1, 0);
Vector3 p;
- if (ABS(normal.dot(p1)) > 0.99) { // if too similar to p1
+ if (ABS(normal.dot(p1)) > 0.99f) { // if too similar to p1
p = p2; // use p2
} else {
p = p1; // use p1
@@ -129,7 +129,7 @@ bool Plane::intersects_segment(const Vector3 &p_begin, const Vector3 &p_end, Vec
real_t dist = (normal.dot(p_begin) - d) / den;
//printf("dist is %i\n",dist);
- if (dist < -CMP_EPSILON || dist > (1.0 + CMP_EPSILON)) {
+ if (dist < -CMP_EPSILON || dist > (1.0f + CMP_EPSILON)) {
return false;
}
diff --git a/core/math/quaternion.cpp b/core/math/quaternion.cpp
index 2ce603cb13..ade252d628 100644
--- a/core/math/quaternion.cpp
+++ b/core/math/quaternion.cpp
@@ -114,7 +114,7 @@ Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) con
cosom = dot(p_to);
// adjust signs (if necessary)
- if (cosom < 0.0) {
+ if (cosom < 0.0f) {
cosom = -cosom;
to1.x = -p_to.x;
to1.y = -p_to.y;
@@ -129,7 +129,7 @@ Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) con
// calculate coefficients
- if ((1.0 - cosom) > CMP_EPSILON) {
+ if ((1.0f - cosom) > CMP_EPSILON) {
// standard case (slerp)
omega = Math::acos(cosom);
sinom = Math::sin(omega);
@@ -138,7 +138,7 @@ Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) con
} else {
// "from" and "to" quaternions are very close
// ... so we can do a linear interpolation
- scale0 = 1.0 - p_weight;
+ scale0 = 1.0f - p_weight;
scale1 = p_weight;
}
// calculate final values
@@ -158,14 +158,14 @@ Quaternion Quaternion::slerpni(const Quaternion &p_to, const real_t &p_weight) c
real_t dot = from.dot(p_to);
- if (Math::absf(dot) > 0.9999) {
+ if (Math::absf(dot) > 0.9999f) {
return from;
}
real_t theta = Math::acos(dot),
- sinT = 1.0 / Math::sin(theta),
+ sinT = 1.0f / Math::sin(theta),
newFactor = Math::sin(p_weight * theta) * sinT,
- invFactor = Math::sin((1.0 - p_weight) * theta) * sinT;
+ invFactor = Math::sin((1.0f - p_weight) * theta) * sinT;
return Quaternion(invFactor * from.x + newFactor * p_to.x,
invFactor * from.y + newFactor * p_to.y,
@@ -179,7 +179,7 @@ Quaternion Quaternion::cubic_slerp(const Quaternion &p_b, const Quaternion &p_pr
ERR_FAIL_COND_V_MSG(!p_b.is_normalized(), Quaternion(), "The end quaternion must be normalized.");
#endif
//the only way to do slerp :|
- real_t t2 = (1.0 - p_weight) * p_weight * 2;
+ real_t t2 = (1.0f - p_weight) * p_weight * 2;
Quaternion sp = this->slerp(p_b, p_weight);
Quaternion sq = p_pre_a.slerpni(p_post_b, p_weight);
return sp.slerpni(sq, t2);
@@ -209,8 +209,8 @@ Quaternion::Quaternion(const Vector3 &p_axis, real_t p_angle) {
z = 0;
w = 0;
} else {
- real_t sin_angle = Math::sin(p_angle * 0.5);
- real_t cos_angle = Math::cos(p_angle * 0.5);
+ real_t sin_angle = Math::sin(p_angle * 0.5f);
+ real_t cos_angle = Math::cos(p_angle * 0.5f);
real_t s = sin_angle / d;
x = p_axis.x * s;
y = p_axis.y * s;
@@ -224,9 +224,9 @@ Quaternion::Quaternion(const Vector3 &p_axis, real_t p_angle) {
// and similar for other axes.
// This implementation uses YXZ convention (Z is the first rotation).
Quaternion::Quaternion(const Vector3 &p_euler) {
- real_t half_a1 = p_euler.y * 0.5;
- real_t half_a2 = p_euler.x * 0.5;
- real_t half_a3 = p_euler.z * 0.5;
+ real_t half_a1 = p_euler.y * 0.5f;
+ real_t half_a2 = p_euler.x * 0.5f;
+ real_t half_a3 = p_euler.z * 0.5f;
// R = Y(a1).X(a2).Z(a3) convention for Euler angles.
// Conversion to quaternion as listed in https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770024290.pdf (page A-6)
diff --git a/core/math/quaternion.h b/core/math/quaternion.h
index 7874e4f428..f8a2c6456e 100644
--- a/core/math/quaternion.h
+++ b/core/math/quaternion.h
@@ -145,19 +145,19 @@ struct _NO_DISCARD_ Quaternion {
Vector3 c = v0.cross(v1);
real_t d = v0.dot(v1);
- if (d < -1.0 + CMP_EPSILON) {
+ if (d < -1.0f + CMP_EPSILON) {
x = 0;
y = 1;
z = 0;
w = 0;
} else {
- real_t s = Math::sqrt((1.0 + d) * 2.0);
- real_t rs = 1.0 / s;
+ real_t s = Math::sqrt((1.0f + d) * 2.0f);
+ real_t rs = 1.0f / s;
x = c.x * rs;
y = c.y * rs;
z = c.z * rs;
- w = s * 0.5;
+ w = s * 0.5f;
}
}
};
@@ -192,7 +192,7 @@ void Quaternion::operator*=(const real_t &s) {
}
void Quaternion::operator/=(const real_t &s) {
- *this *= 1.0 / s;
+ *this *= 1.0f / s;
}
Quaternion Quaternion::operator+(const Quaternion &q2) const {
@@ -215,7 +215,7 @@ Quaternion Quaternion::operator*(const real_t &s) const {
}
Quaternion Quaternion::operator/(const real_t &s) const {
- return *this * (1.0 / s);
+ return *this * (1.0f / s);
}
bool Quaternion::operator==(const Quaternion &p_quaternion) const {
diff --git a/core/math/rect2.h b/core/math/rect2.h
index 6ecc02336c..679af933c2 100644
--- a/core/math/rect2.h
+++ b/core/math/rect2.h
@@ -49,7 +49,7 @@ struct _NO_DISCARD_ Rect2 {
real_t get_area() const { return size.width * size.height; }
- _FORCE_INLINE_ Vector2 get_center() const { return position + (size * 0.5); }
+ _FORCE_INLINE_ Vector2 get_center() const { return position + (size * 0.5f); }
inline bool intersects(const Rect2 &p_rect, const bool p_include_borders = false) const {
#ifdef MATH_CHECKS
@@ -285,7 +285,7 @@ struct _NO_DISCARD_ Rect2 {
}
Vector2 get_support(const Vector2 &p_normal) const {
- Vector2 half_extents = size * 0.5;
+ Vector2 half_extents = size * 0.5f;
Vector2 ofs = position + half_extents;
return Vector2(
(p_normal.x > 0) ? -half_extents.x : half_extents.x,
@@ -307,14 +307,14 @@ struct _NO_DISCARD_ Rect2 {
Vector2 r = (b - a);
float l = r.length();
- if (l == 0.0) {
+ if (l == 0.0f) {
continue;
}
//check inside
Vector2 tg = r.orthogonal();
float s = tg.dot(center) - tg.dot(a);
- if (s < 0.0) {
+ if (s < 0.0f) {
side_plus++;
} else {
side_minus++;
@@ -322,7 +322,7 @@ struct _NO_DISCARD_ Rect2 {
//check ray box
r /= l;
- Vector2 ir(1.0 / r.x, 1.0 / r.y);
+ Vector2 ir(1.0f / r.x, 1.0f / r.y);
// lb is the corner of AABB with minimal coordinates - left bottom, rt is maximal corner
// r.org is origin of ray
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index e6e24e9b32..55c1f06ff5 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -50,7 +50,7 @@ void Transform2D::affine_invert() {
#ifdef MATH_CHECKS
ERR_FAIL_COND(det == 0);
#endif
- real_t idet = 1.0 / det;
+ real_t idet = 1.0f / det;
SWAP(elements[0][0], elements[1][1]);
elements[0] *= Vector2(idet, -idet);
@@ -71,12 +71,12 @@ void Transform2D::rotate(const real_t p_phi) {
real_t Transform2D::get_skew() const {
real_t det = basis_determinant();
- return Math::acos(elements[0].normalized().dot(SIGN(det) * elements[1].normalized())) - Math_PI * 0.5;
+ return Math::acos(elements[0].normalized().dot(SIGN(det) * elements[1].normalized())) - Math_PI * 0.5f;
}
void Transform2D::set_skew(const real_t p_angle) {
real_t det = basis_determinant();
- elements[1] = SIGN(det) * elements[0].rotated((Math_PI * 0.5 + p_angle)).normalized() * elements[1].length();
+ elements[1] = SIGN(det) * elements[0].rotated((Math_PI * 0.5f + p_angle)).normalized() * elements[1].length();
}
real_t Transform2D::get_rotation() const {
@@ -268,11 +268,11 @@ Transform2D Transform2D::interpolate_with(const Transform2D &p_transform, const
real_t dot = v1.dot(v2);
- dot = CLAMP(dot, -1.0, 1.0);
+ dot = CLAMP(dot, -1.0f, 1.0f);
Vector2 v;
- if (dot > 0.9995) {
+ if (dot > 0.9995f) {
v = v1.lerp(v2, p_c).normalized(); //linearly interpolate to avoid numerical precision issues
} else {
real_t angle = p_c * Math::acos(dot);
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp
index f3e3de5fc2..0a9872ae08 100644
--- a/core/math/triangulate.cpp
+++ b/core/math/triangulate.cpp
@@ -39,7 +39,7 @@ real_t Triangulate::get_area(const Vector<Vector2> &contour) {
for (int p = n - 1, q = 0; q < n; p = q++) {
A += c[p].cross(c[q]);
}
- return A * 0.5;
+ return A * 0.5f;
}
/* `is_inside_triangle` decides if a point P is inside the triangle
@@ -70,9 +70,9 @@ bool Triangulate::is_inside_triangle(real_t Ax, real_t Ay,
bCROSScp = bx * cpy - by * cpx;
if (include_edges) {
- return ((aCROSSbp > 0.0) && (bCROSScp > 0.0) && (cCROSSap > 0.0));
+ return ((aCROSSbp > 0.0f) && (bCROSScp > 0.0f) && (cCROSSap > 0.0f));
} else {
- return ((aCROSSbp >= 0.0) && (bCROSScp >= 0.0) && (cCROSSap >= 0.0));
+ return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f));
}
}
@@ -128,7 +128,7 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour, Vector<int> &resul
/* we want a counter-clockwise polygon in V */
- if (0.0 < get_area(contour)) {
+ if (0.0f < get_area(contour)) {
for (int v = 0; v < n; v++) {
V.write[v] = v;
}
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index 40149e8cc1..120b66e432 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -163,11 +163,11 @@ Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, c
real_t t3 = t2 * t;
Vector2 out;
- out = 0.5 *
- ((p1 * 2.0) +
+ out = 0.5f *
+ ((p1 * 2.0f) +
(-p0 + p2) * t +
- (2.0 * p0 - 5.0 * p1 + 4 * p2 - p3) * t2 +
- (-p0 + 3.0 * p1 - 3.0 * p2 + p3) * t3);
+ (2.0f * p0 - 5.0f * p1 + 4 * p2 - p3) * t2 +
+ (-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3);
return out;
}
@@ -194,7 +194,7 @@ Vector2 Vector2::reflect(const Vector2 &p_normal) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector2(), "The normal Vector2 must be normalized.");
#endif
- return 2.0 * p_normal * this->dot(p_normal) - *this;
+ return 2.0f * p_normal * this->dot(p_normal) - *this;
}
bool Vector2::is_equal_approx(const Vector2 &p_v) const {
diff --git a/core/math/vector2.h b/core/math/vector2.h
index 92ac5257b0..a2680b84fc 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -248,7 +248,7 @@ Vector2 Vector2::lerp(const Vector2 &p_to, const real_t p_weight) const {
Vector2 Vector2::slerp(const Vector2 &p_to, const real_t p_weight) const {
real_t start_length_sq = length_squared();
real_t end_length_sq = p_to.length_squared();
- if (unlikely(start_length_sq == 0.0 || end_length_sq == 0.0)) {
+ if (unlikely(start_length_sq == 0.0f || end_length_sq == 0.0f)) {
// Zero length vectors have no angle, so the best we can do is either lerp or throw an error.
return lerp(p_to, p_weight);
}
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index b6965b3c32..bafb01da59 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -93,11 +93,11 @@ Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, c
real_t t3 = t2 * t;
Vector3 out;
- out = 0.5 *
- ((p1 * 2.0) +
+ out = 0.5f *
+ ((p1 * 2.0f) +
(-p0 + p2) * t +
- (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3) * t2 +
- (-p0 + 3.0 * p1 - 3.0 * p2 + p3) * t3);
+ (2.0f * p0 - 5.0f * p1 + 4.0f * p2 - p3) * t2 +
+ (-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3);
return out;
}
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 345329f7f3..c1da159e00 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -108,22 +108,22 @@ struct _NO_DISCARD_ Vector3 {
Vector3 n = *this;
n /= Math::abs(n.x) + Math::abs(n.y) + Math::abs(n.z);
Vector2 o;
- if (n.z >= 0.0) {
+ if (n.z >= 0.0f) {
o.x = n.x;
o.y = n.y;
} else {
- o.x = (1.0 - Math::abs(n.y)) * (n.x >= 0.0 ? 1.0 : -1.0);
- o.y = (1.0 - Math::abs(n.x)) * (n.y >= 0.0 ? 1.0 : -1.0);
+ o.x = (1.0f - Math::abs(n.y)) * (n.x >= 0.0f ? 1.0f : -1.0f);
+ o.y = (1.0f - Math::abs(n.x)) * (n.y >= 0.0f ? 1.0f : -1.0f);
}
- o.x = o.x * 0.5 + 0.5;
- o.y = o.y * 0.5 + 0.5;
+ o.x = o.x * 0.5f + 0.5f;
+ o.y = o.y * 0.5f + 0.5f;
return o;
}
static _FORCE_INLINE_ Vector3 octahedron_decode(const Vector2 &p_oct) {
- Vector2 f(p_oct.x * 2.0 - 1.0, p_oct.y * 2.0 - 1.0);
+ Vector2 f(p_oct.x * 2.0f - 1.0f, p_oct.y * 2.0f - 1.0f);
Vector3 n(f.x, f.y, 1.0f - Math::abs(f.x) - Math::abs(f.y));
- float t = CLAMP(-n.z, 0.0, 1.0);
+ float t = CLAMP(-n.z, 0.0f, 1.0f);
n.x += n.x >= 0 ? -t : t;
n.y += n.y >= 0 ? -t : t;
return n.normalized();
@@ -243,7 +243,7 @@ Vector3 Vector3::lerp(const Vector3 &p_to, const real_t p_weight) const {
Vector3 Vector3::slerp(const Vector3 &p_to, const real_t p_weight) const {
real_t start_length_sq = length_squared();
real_t end_length_sq = p_to.length_squared();
- if (unlikely(start_length_sq == 0.0 || end_length_sq == 0.0)) {
+ if (unlikely(start_length_sq == 0.0f || end_length_sq == 0.0f)) {
// Zero length vectors have no angle, so the best we can do is either lerp or throw an error.
return lerp(p_to, p_weight);
}
@@ -477,7 +477,7 @@ bool Vector3::is_normalized() const {
}
Vector3 Vector3::inverse() const {
- return Vector3(1.0 / x, 1.0 / y, 1.0 / z);
+ return Vector3(1.0f / x, 1.0f / y, 1.0f / z);
}
void Vector3::zero() {
@@ -500,7 +500,7 @@ Vector3 Vector3::reflect(const Vector3 &p_normal) const {
#ifdef MATH_CHECKS
ERR_FAIL_COND_V_MSG(!p_normal.is_normalized(), Vector3(), "The normal Vector3 must be normalized.");
#endif
- return 2.0 * p_normal * this->dot(p_normal) - *this;
+ return 2.0f * p_normal * this->dot(p_normal) - *this;
}
#endif // VECTOR3_H
diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp
index 8431ceacf9..410b62068a 100644
--- a/core/os/midi_driver.cpp
+++ b/core/os/midi_driver.cpp
@@ -31,7 +31,6 @@
#include "midi_driver.h"
#include "core/input/input.h"
-#include "core/os/os.h"
uint8_t MIDIDriver::last_received_message = 0x00;
MIDIDriver *MIDIDriver::singleton = nullptr;
diff --git a/core/os/os.h b/core/os/os.h
index 36d85da70b..d3d2a868fa 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -34,7 +34,6 @@
#include "core/config/engine.h"
#include "core/io/image.h"
#include "core/io/logger.h"
-#include "core/os/main_loop.h"
#include "core/string/ustring.h"
#include "core/templates/list.h"
#include "core/templates/vector.h"
diff --git a/core/os/threaded_array_processor.h b/core/os/threaded_array_processor.h
index 48b86cc1a1..935fc7a360 100644
--- a/core/os/threaded_array_processor.h
+++ b/core/os/threaded_array_processor.h
@@ -31,7 +31,6 @@
#ifndef THREADED_ARRAY_PROCESSOR_H
#define THREADED_ARRAY_PROCESSOR_H
-#include "core/os/mutex.h"
#include "core/os/os.h"
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
diff --git a/core/variant/typed_array.h b/core/variant/typed_array.h
index 50411121bc..aadd6fee89 100644
--- a/core/variant/typed_array.h
+++ b/core/variant/typed_array.h
@@ -31,8 +31,10 @@
#ifndef TYPED_ARRAY_H
#define TYPED_ARRAY_H
+#include "core/object/object.h"
#include "core/variant/array.h"
#include "core/variant/method_ptrcall.h"
+#include "core/variant/type_info.h"
#include "core/variant/variant.h"
template <class T>
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 71c76f57cf..2b407ecacf 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -33,6 +33,7 @@
#include "core/os/keyboard.h"
#include "editor/editor_scale.h"
#include "scene/gui/center_container.h"
+#include "scene/gui/separator.h"
/////////////////////////////////////////
diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h
index e61d1a334a..9988cd8db6 100644
--- a/editor/action_map_editor.h
+++ b/editor/action_map_editor.h
@@ -32,7 +32,7 @@
#define ACTION_MAP_EDITOR_H
#include "editor/editor_data.h"
-#include <scene/gui/color_rect.h>
+#include "scene/gui/color_rect.h"
// Confirmation Dialog used when configuring an input event.
// Separate from ActionMapEditor for code cleanliness and separation of responsibilities.
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index 67cdba043a..40b5de2ec7 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -31,7 +31,7 @@
#include "animation_bezier_editor.h"
#include "editor/editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_scale.h"
#include "scene/gui/view_panner.h"
#include "scene/resources/text_line.h"
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index ba5cdb2896..961eb907bb 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -33,9 +33,9 @@
#include "animation_track_editor_plugins.h"
#include "core/input/input.h"
#include "editor/animation_bezier_editor.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "editor/plugins/animation_player_editor_plugin.h"
-#include "editor_node.h"
-#include "editor_scale.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/view_panner.h"
#include "scene/main/window.h"
diff --git a/editor/animation_track_editor.h b/editor/animation_track_editor.h
index 627c7c1d97..d0029ff80f 100644
--- a/editor/animation_track_editor.h
+++ b/editor/animation_track_editor.h
@@ -37,7 +37,6 @@
#include "editor/property_selector.h"
#include "scene/gui/control.h"
-#include "scene/gui/file_dialog.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/scroll_bar.h"
#include "scene/gui/slider.h"
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 058e59dea3..e87678a51b 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -31,8 +31,8 @@
#include "animation_track_editor_plugins.h"
#include "editor/audio_stream_preview.h"
-#include "editor_resource_preview.h"
-#include "editor_scale.h"
+#include "editor/editor_resource_preview.h"
+#include "editor/editor_scale.h"
#include "scene/2d/animated_sprite_2d.h"
#include "scene/2d/sprite_2d.h"
#include "scene/3d/sprite_3d.h"
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index 6be8a7e564..58527ee4d1 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -31,7 +31,7 @@
#include "array_property_edit.h"
#include "core/io/marshalls.h"
-#include "editor_node.h"
+#include "editor/editor_node.h"
#define ITEMS_PER_PAGE 100
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 2627baaea8..3be6d6ea12 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -34,9 +34,9 @@
#include "core/object/message_queue.h"
#include "core/os/keyboard.h"
#include "core/string/string_builder.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
-#include "editor_node.h"
-#include "editor_settings.h"
+#include "editor/editor_settings.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/separator.h"
#include "scene/resources/font.h"
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 8efcd60210..4d0c5feef2 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -32,9 +32,10 @@
#include "core/string/print_string.h"
#include "editor/doc_tools.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/scene_tree_dock.h"
#include "plugins/script_editor_plugin.h"
#include "scene/gui/label.h"
#include "scene/gui/popup_menu.h"
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 61ec8abacf..c0c7b68686 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -32,10 +32,10 @@
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
-#include "editor_feature_profile.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_feature_profile.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode, const String &p_select_type) {
_fill_type_list();
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index a82c4db191..fe7c89c059 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -31,7 +31,7 @@
#ifndef CREATE_DIALOG_H
#define CREATE_DIALOG_H
-#include "editor_help.h"
+#include "editor/editor_help.h"
#include "scene/gui/button.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index 8702e773f8..681bbf09fe 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_node.h"
#include "editor/plugins/editor_debugger_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
+#include "editor/scene_tree_dock.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/tab_container.h"
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index 41f4db541d..c1fffae404 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -30,7 +30,9 @@
#include "editor_debugger_tree.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
+#include "editor/scene_tree_dock.h"
#include "scene/debugger/scene_debugger.h"
#include "scene/resources/packed_scene.h"
#include "servers/display_server.h"
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 28e8edb26e..49f4c2382b 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -41,6 +41,7 @@
#include "editor/debugger/editor_performance_profiler.h"
#include "editor/debugger/editor_profiler.h"
#include "editor/debugger/editor_visual_profiler.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h
index c061e7c61e..1fc295b279 100644
--- a/editor/debugger/script_editor_debugger.h
+++ b/editor/debugger/script_editor_debugger.h
@@ -35,7 +35,6 @@
#include "editor/debugger/editor_debugger_inspector.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/debugger/editor_debugger_server.h"
-#include "editor/editor_file_dialog.h"
#include "scene/gui/button.h"
#include "scene/gui/margin_container.h"
@@ -50,6 +49,7 @@ class TreeItem;
class HSplitContainer;
class ItemList;
class EditorProfiler;
+class EditorFileDialog;
class EditorVisualProfiler;
class EditorNetworkProfiler;
class EditorPerformanceProfiler;
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 1fa5df9396..dc97f53924 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -30,10 +30,13 @@
#include "dependency_editor.h"
+#include "core/config/project_settings.h"
#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "scene/gui/margin_container.h"
void DependencyEditor::_searched(const String &p_path) {
diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h
index d50b0849b7..1d2e173bc2 100644
--- a/editor/dependency_editor.h
+++ b/editor/dependency_editor.h
@@ -31,8 +31,8 @@
#ifndef DEPENDENCY_EDITOR_H
#define DEPENDENCY_EDITOR_H
-#include "editor_file_dialog.h"
#include "scene/gui/dialogs.h"
+#include "scene/gui/item_list.h"
#include "scene/gui/tab_container.h"
#include "scene/gui/tree.h"
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
index 30082f2e1a..630265e268 100644
--- a/editor/dictionary_property_edit.cpp
+++ b/editor/dictionary_property_edit.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "dictionary_property_edit.h"
-#include "editor_node.h"
+#include "editor/editor_node.h"
void DictionaryPropertyEdit::_notif_change() {
notify_property_list_changed();
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index 4309f55a2b..2eae08e741 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -34,7 +34,7 @@
#include "core/donors.gen.h"
#include "core/license.gen.h"
#include "core/version.h"
-#include "editor_node.h"
+#include "editor/editor_node.h"
// The metadata key used to store and retrieve the version text to copy to the clipboard.
static const String META_TEXT_TO_COPY = "text_to_copy";
diff --git a/editor/editor_about.h b/editor/editor_about.h
index e57b211ed4..5a3b1e1987 100644
--- a/editor/editor_about.h
+++ b/editor/editor_about.h
@@ -31,7 +31,6 @@
#ifndef EDITOR_ABOUT_H
#define EDITOR_ABOUT_H
-#include "scene/gui/control.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
#include "scene/gui/link_button.h"
@@ -43,7 +42,7 @@
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
-#include "editor_scale.h"
+#include "editor/editor_scale.h"
/**
* NOTE: Do not assume the EditorNode singleton to be available in this class' methods.
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 76c0811166..3835399c99 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -33,8 +33,9 @@
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/zip_io.h"
-#include "editor_node.h"
-#include "progress_dialog.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_node.h"
+#include "editor/progress_dialog.h"
void EditorAssetInstaller::_item_edited() {
if (updating) {
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 5e4e375db4..d091ca5056 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -30,11 +30,13 @@
#include "editor_audio_buses.h"
+#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/io/resource_saver.h"
#include "core/os/keyboard.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "filesystem_dock.h"
#include "scene/resources/font.h"
#include "servers/audio_server.h"
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index f856556363..a830a2719d 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -31,8 +31,7 @@
#ifndef EDITORAUDIOBUSES_H
#define EDITORAUDIOBUSES_H
-#include "editor/editor_file_dialog.h"
-#include "editor_plugin.h"
+#include "editor/editor_plugin.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/control.h"
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 6d31141be7..a1250ef9f4 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -32,8 +32,9 @@
#include "core/config/project_settings.h"
#include "core/core_constants.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "project_settings_editor.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index 20f6bf476f..135ff48a0c 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -31,9 +31,11 @@
#ifndef EDITOR_AUTOLOAD_SETTINGS_H
#define EDITOR_AUTOLOAD_SETTINGS_H
+#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
#include "scene/gui/tree.h"
-#include "editor_file_dialog.h"
+class EditorFileDialog;
class EditorAutoloadSettings : public VBoxContainer {
GDCLASS(EditorAutoloadSettings, VBoxContainer);
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 625330ef37..ff452f8a96 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -34,8 +34,8 @@
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
-#include "editor_node.h"
-#include "editor_settings.h"
+#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "scene/resources/packed_scene.h"
void EditorHistory::cleanup_history() {
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index 39054b7033..5f5e4f37fd 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -33,8 +33,8 @@
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "editor/editor_file_system.h"
+#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-#include "editor_scale.h"
#include "servers/display_server.h"
void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path) {
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 632d67c061..eee67693e2 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -44,9 +44,9 @@
#include "core/object/script_language.h"
#include "core/version.h"
#include "editor/editor_file_system.h"
+#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
-#include "editor_node.h"
-#include "editor_settings.h"
#include "scene/resources/resource_format_text.h"
static int _get_pad(int p_alignment, int p_n) {
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 2fc29c46af..976c9043d2 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -32,9 +32,10 @@
#include "core/io/dir_access.h"
#include "core/io/json.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
-#include "editor_node.h"
-#include "editor_scale.h"
const char *EditorFeatureProfile::feature_names[FEATURE_MAX] = {
TTRC("3D Editor"),
diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h
index c5f4ad60f4..7ea40502a6 100644
--- a/editor/editor_feature_profile.h
+++ b/editor/editor_feature_profile.h
@@ -33,8 +33,7 @@
#include "core/io/file_access.h"
#include "core/object/ref_counted.h"
-#include "editor/editor_file_dialog.h"
-#include "editor_help.h"
+#include "editor/editor_help.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/option_button.h"
#include "scene/gui/separator.h"
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index b6d8ea5bd6..74e02609f9 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -30,15 +30,16 @@
#include "editor_file_dialog.h"
+#include "core/config/project_settings.h"
#include "core/io/file_access.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
#include "dependency_editor.h"
-#include "editor_file_system.h"
-#include "editor_resource_preview.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_resource_preview.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/center_container.h"
#include "scene/gui/label.h"
#include "scene/gui/margin_container.h"
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 5beed352a6..34a21c90fe 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -38,9 +38,9 @@
#include "core/io/resource_saver.h"
#include "core/os/os.h"
#include "core/variant/variant_parser.h"
-#include "editor_node.h"
-#include "editor_resource_preview.h"
-#include "editor_settings.h"
+#include "editor/editor_node.h"
+#include "editor/editor_resource_preview.h"
+#include "editor/editor_settings.h"
EditorFileSystem *EditorFileSystem::singleton = nullptr;
//the name is the version, to keep compatibility with different versions of Godot
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index 266a064807..8d6ebd1154 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -31,8 +31,8 @@
#include "editor_folding.h"
#include "core/io/file_access.h"
-#include "editor_inspector.h"
-#include "editor_settings.h"
+#include "editor/editor_inspector.h"
+#include "editor/editor_settings.h"
Vector<String> EditorFolding::_get_unfolds(const Object *p_object) {
Vector<String> sections;
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 0c9a7b2972..dc84b99d04 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -32,8 +32,8 @@
#include "builtin_fonts.gen.h"
#include "core/io/dir_access.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/resources/default_theme/default_theme.h"
#include "scene/resources/font.h"
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index e80e9c43b0..7d88b94a37 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -35,10 +35,10 @@
#include "core/os/keyboard.h"
#include "core/version_generated.gen.h"
#include "doc_data_compressed.gen.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/script_editor_plugin.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
#define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL)
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 29bf22a478..aa4688452c 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -31,9 +31,9 @@
#include "editor_help_search.h"
#include "core/os/keyboard.h"
-#include "editor_feature_profile.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_feature_profile.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
void EditorHelpSearch::_update_icons() {
search_box->set_right_icon(results_tree->get_theme_icon(SNAME("Search"), SNAME("EditorIcons")));
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index d94f1d80e5..73acea43fd 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -34,10 +34,10 @@
#include "core/os/keyboard.h"
#include "dictionary_property_edit.h"
#include "editor/doc_tools.h"
-#include "editor_feature_profile.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_feature_profile.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "multi_node_edit.h"
#include "scene/property_utils.h"
#include "scene/resources/packed_scene.h"
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp
index 48a326d6d4..abef0dc353 100644
--- a/editor/editor_locale_dialog.cpp
+++ b/editor/editor_locale_dialog.cpp
@@ -30,6 +30,7 @@
#include "editor_locale_dialog.h"
+#include "core/config/project_settings.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/check_button.h"
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index db4de3bed0..45d7f8d697 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -32,8 +32,8 @@
#include "core/os/keyboard.h"
#include "core/version.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "scene/gui/center_container.h"
#include "scene/resources/font.h"
diff --git a/editor/editor_log.h b/editor/editor_log.h
index 69a6a0b449..e66b732ffe 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -34,7 +34,6 @@
#include "core/os/thread.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
-#include "scene/gui/control.h"
#include "scene/gui/label.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/panel_container.h"
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index cf5af38a07..28da588a06 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -76,9 +76,12 @@
#include "editor/editor_about.h"
#include "editor/editor_audio_buses.h"
#include "editor/editor_command_palette.h"
+#include "editor/editor_data.h"
#include "editor/editor_export.h"
#include "editor/editor_feature_profile.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
+#include "editor/editor_folding.h"
#include "editor/editor_help.h"
#include "editor/editor_inspector.h"
#include "editor/editor_layouts_dialog.h"
@@ -88,6 +91,7 @@
#include "editor/editor_properties.h"
#include "editor/editor_resource_picker.h"
#include "editor/editor_resource_preview.h"
+#include "editor/editor_run.h"
#include "editor/editor_run_native.h"
#include "editor/editor_run_script.h"
#include "editor/editor_scale.h"
@@ -193,6 +197,7 @@
#include "editor/project_settings_editor.h"
#include "editor/quick_open.h"
#include "editor/register_exporters.h"
+#include "editor/scene_tree_dock.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 8d322a1bfd..c05e6cd281 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -32,16 +32,12 @@
#define EDITOR_NODE_H
#include "core/templates/safe_refcount.h"
-#include "editor/editor_data.h"
#include "editor/editor_export.h"
#include "editor/editor_folding.h"
#include "editor/editor_native_shader_source_visualizer.h"
#include "editor/editor_run.h"
-#include "editor/editor_toaster.h"
#include "editor/inspector_dock.h"
#include "editor/property_editor.h"
-#include "editor/scene_tree_dock.h"
-#include "scene/gui/link_button.h"
typedef void (*EditorNodeInitCallback)();
typedef void (*EditorPluginInitializeCallback)();
@@ -50,16 +46,20 @@ typedef bool (*EditorBuildCallback)();
class AcceptDialog;
class AudioStreamPreviewGenerator;
class BackgroundProgress;
+class Button;
class CenterContainer;
class ConfirmationDialog;
class Control;
class DependencyEditor;
class DependencyErrorDialog;
+class DynamicFontImportSettings;
class EditorAbout;
class EditorCommandPalette;
class EditorExport;
+class EditorExtensionManager;
class EditorFeatureProfileManager;
class EditorFileServer;
+class EditorFolding;
class EditorInspector;
class EditorLayoutsDialog;
class EditorLog;
@@ -67,12 +67,16 @@ class EditorPlugin;
class EditorPluginList;
class EditorQuickOpen;
class EditorResourcePreview;
+class EditorRun;
class EditorRunNative;
class EditorSettingsDialog;
+class EditorToaster;
class ExportTemplateManager;
+class FileDialog;
class FileSystemDock;
class HSplitContainer;
class ImportDock;
+class LinkButton;
class MenuButton;
class NodeDock;
class OrphanResourcesDialog;
@@ -83,17 +87,14 @@ class ProgressDialog;
class ProjectExportDialog;
class ProjectSettingsEditor;
class RunSettingsDialog;
+class SceneImportSettings;
class ScriptCreateDialog;
-class TabContainer;
+class SubViewport;
class TabBar;
+class TabContainer;
class TextureProgressBar;
-class Button;
class VSplitContainer;
class Window;
-class SubViewport;
-class SceneImportSettings;
-class EditorExtensionManager;
-class DynamicFontImportSettings;
class EditorNode : public Node {
GDCLASS(EditorNode, Node);
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index 3dee06fb3e..716f10c679 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -30,8 +30,8 @@
#include "editor_path.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) {
if (p_depth > 8) {
diff --git a/editor/editor_path.h b/editor/editor_path.h
index ad8443534d..04cf3d2ca7 100644
--- a/editor/editor_path.h
+++ b/editor/editor_path.h
@@ -31,7 +31,7 @@
#ifndef EDITOR_PATH_H
#define EDITOR_PATH_H
-#include "editor_data.h"
+#include "editor/editor_data.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/popup_menu.h"
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index fe44486d0d..24ce9e2636 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -34,10 +34,11 @@
#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
+#include "editor/editor_resource_preview.h"
#include "editor/editor_settings.h"
#include "editor/filesystem_dock.h"
#include "editor/project_settings_editor.h"
-#include "editor_resource_preview.h"
+#include "editor/scene_tree_dock.h"
#include "main/main.h"
#include "plugins/canvas_item_editor_plugin.h"
#include "plugins/node_3d_editor_plugin.h"
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 80329a36b2..aa59337ac0 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -34,8 +34,8 @@
#include "core/io/config_file.h"
#include "core/io/file_access.h"
#include "core/os/main_loop.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "scene/gui/margin_container.h"
void EditorPluginSettings::_notification(int p_what) {
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index 8ff6e4b9e1..4648d105f7 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -32,8 +32,8 @@
#define EDITORPLUGINSETTINGS_H
#include "core/object/undo_redo.h"
+#include "editor/editor_data.h"
#include "editor/plugin_config_dialog.h"
-#include "editor_data.h"
#include "property_editor.h"
#include "scene/gui/dialogs.h"
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index ef1ceebabf..65c4ace468 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -30,11 +30,13 @@
#include "editor_properties.h"
+#include "core/config/project_settings.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/editor_properties_array_dict.h"
#include "editor/editor_resource_preview.h"
+#include "editor/editor_scale.h"
#include "editor/filesystem_dock.h"
-#include "editor_node.h"
-#include "editor_properties_array_dict.h"
-#include "editor_scale.h"
#include "scene/2d/gpu_particles_2d.h"
#include "scene/3d/fog_volume.h"
#include "scene/3d/gpu_particles_3d.h"
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index fc0c0e7d7b..162e2192a3 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -33,8 +33,8 @@
#include "core/input/input.h"
#include "core/io/marshalls.h"
#include "editor/editor_node.h"
+#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
-#include "editor_properties.h"
bool EditorPropertyArrayObject::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name;
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 398a096550..cb6901f130 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -30,11 +30,13 @@
#include "editor_resource_picker.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
-#include "filesystem_dock.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/filesystem_dock.h"
+#include "editor/scene_tree_dock.h"
HashMap<StringName, List<StringName>> EditorResourcePicker::allowed_types_cache;
diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h
index 8ffa52f14f..192dca50ca 100644
--- a/editor/editor_resource_picker.h
+++ b/editor/editor_resource_picker.h
@@ -31,13 +31,14 @@
#ifndef EDITOR_RESOURCE_PICKER_H
#define EDITOR_RESOURCE_PICKER_H
-#include "editor_file_dialog.h"
#include "quick_open.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/popup_menu.h"
#include "scene/gui/texture_rect.h"
+class EditorFileDialog;
+
class EditorResourcePicker : public HBoxContainer {
GDCLASS(EditorResourcePicker, HBoxContainer);
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 2d1335270c..8a9ca53567 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -35,9 +35,9 @@
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/object/message_queue.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
bool success;
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 574abf85ea..4743294967 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -32,7 +32,7 @@
#include "core/config/project_settings.h"
#include "editor/editor_node.h"
-#include "editor_settings.h"
+#include "editor/editor_settings.h"
#include "servers/display_server.h"
EditorRun::Status EditorRun::get_status() const {
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index adaeaad6ae..98f315f0db 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -30,9 +30,9 @@
#include "editor_run_native.h"
-#include "editor_export.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_export.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
void EditorRunNative::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 77173d178b..2197bc8eb7 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -30,7 +30,7 @@
#include "editor_run_script.h"
-#include "editor_node.h"
+#include "editor/editor_node.h"
void EditorScript::add_root_node(Node *p_node) {
if (!editor) {
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index 7fb728a00a..1d2d53f299 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -32,7 +32,7 @@
#define EDITOR_RUN_SCRIPT_H
#include "core/object/ref_counted.h"
-#include "editor_plugin.h"
+#include "editor/editor_plugin.h"
class EditorNode;
class EditorScript : public RefCounted {
GDCLASS(EditorScript, RefCounted);
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp
index 1bab56ac4a..19374f826a 100644
--- a/editor/editor_sectioned_inspector.cpp
+++ b/editor/editor_sectioned_inspector.cpp
@@ -30,7 +30,7 @@
#include "editor_sectioned_inspector.h"
-#include "editor_scale.h"
+#include "editor/editor_scale.h"
class SectionedInspectorFilter : public Object {
GDCLASS(SectionedInspectorFilter, Object);
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index fc37590337..e4ad62c470 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -34,11 +34,11 @@
#include "core/input/input_map.h"
#include "core/os/keyboard.h"
#include "editor/debugger/editor_debugger_node.h"
-#include "editor_file_system.h"
-#include "editor_log.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_log.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/margin_container.h"
void EditorSettingsDialog::ok_pressed() {
diff --git a/editor/editor_settings_dialog.h b/editor/editor_settings_dialog.h
index c8858b4fcb..4b90506b4b 100644
--- a/editor/editor_settings_dialog.h
+++ b/editor/editor_settings_dialog.h
@@ -32,8 +32,8 @@
#define EDITOR_SETTINGS_DIALOG_H
#include "editor/action_map_editor.h"
+#include "editor/editor_inspector.h"
#include "editor/editor_sectioned_inspector.h"
-#include "editor_inspector.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/panel_container.h"
#include "scene/gui/rich_text_label.h"
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index cd28a65c7b..6a2e40387b 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -33,8 +33,8 @@
#include "core/input/input.h"
#include "core/math/expression.h"
#include "core/os/keyboard.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
if (grabber->is_visible()) {
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 6d3dcd6bc9..5808bc2b55 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -33,10 +33,10 @@
#include "core/error/error_macros.h"
#include "core/io/resource_loader.h"
#include "core/variant/dictionary.h"
-#include "editor_fonts.h"
-#include "editor_icons.gen.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_fonts.h"
+#include "editor/editor_icons.gen.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "modules/modules_enabled.gen.h" // For svg.
#ifdef MODULE_SVG_ENABLED
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp
index 24227b3a6b..121d1256dc 100644
--- a/editor/editor_toaster.cpp
+++ b/editor/editor_toaster.cpp
@@ -28,13 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "editor_toaster.h"
+
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "scene/gui/button.h"
#include "scene/gui/label.h"
#include "scene/gui/panel_container.h"
-#include "editor_toaster.h"
-
EditorToaster *EditorToaster::singleton = nullptr;
void EditorToaster::_notification(int p_what) {
diff --git a/editor/editor_toaster.h b/editor/editor_toaster.h
index 5f220e98c4..2ad8752bee 100644
--- a/editor/editor_toaster.h
+++ b/editor/editor_toaster.h
@@ -31,12 +31,12 @@
#ifndef EDITOR_TOASTER_H
#define EDITOR_TOASTER_H
-#include "scene/gui/box_container.h"
-#include "scene/gui/button.h"
-#include "scene/gui/popup.h"
-
#include "core/string/ustring.h"
#include "core/templates/local_vector.h"
+#include "scene/gui/box_container.h"
+
+class Button;
+class PanelContainer;
class EditorToaster : public HBoxContainer {
GDCLASS(EditorToaster, HBoxContainer);
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 8c34609e9c..379bbc343c 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -36,8 +36,8 @@
#include "core/io/zip_io.h"
#include "core/os/keyboard.h"
#include "core/version.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "progress_dialog.h"
#include "scene/gui/link_button.h"
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index c91351022f..3625c14740 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -37,11 +37,12 @@
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/templates/list.h"
-#include "editor_feature_profile.h"
-#include "editor_node.h"
-#include "editor_resource_preview.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_feature_profile.h"
+#include "editor/editor_node.h"
+#include "editor/editor_resource_preview.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/scene_tree_dock.h"
#include "import_dock.h"
#include "scene/main/window.h"
#include "scene/resources/packed_scene.h"
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 1dc986dcb2..e6a5e62092 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -49,8 +49,8 @@
#include "create_dialog.h"
#include "dependency_editor.h"
-#include "editor_dir_dialog.h"
-#include "editor_file_system.h"
+#include "editor/editor_dir_dialog.h"
+#include "editor/editor_file_system.h"
#include "script_create_dialog.h"
class EditorNode;
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index dd72def6ad..929f8b8d2c 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -30,10 +30,11 @@
#include "find_in_files.h"
+#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/os/os.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index 1644bb9dbe..4b3a7a8313 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -30,9 +30,10 @@
#include "groups_editor.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/scene_tree_dock.h"
#include "editor/scene_tree_editor.h"
-#include "editor_node.h"
-#include "editor_scale.h"
#include "scene/gui/box_container.h"
#include "scene/gui/label.h"
#include "scene/resources/packed_scene.h"
diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp
index 244352fbb2..33c861ba24 100644
--- a/editor/import/dynamicfont_import_settings.cpp
+++ b/editor/import/dynamicfont_import_settings.cpp
@@ -30,6 +30,10 @@
#include "dynamicfont_import_settings.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_inspector.h"
+#include "editor/editor_locale_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
diff --git a/editor/import/dynamicfont_import_settings.h b/editor/import/dynamicfont_import_settings.h
index 5d37f58b9b..8892e20ae6 100644
--- a/editor/import/dynamicfont_import_settings.h
+++ b/editor/import/dynamicfont_import_settings.h
@@ -31,10 +31,6 @@
#ifndef FONTDATA_IMPORT_SETTINGS_H
#define FONTDATA_IMPORT_SETTINGS_H
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_inspector.h"
-#include "editor/editor_locale_dialog.h"
-
#include "editor/import/resource_importer_dynamicfont.h"
#include "scene/gui/dialogs.h"
@@ -50,6 +46,9 @@
#include "servers/text_server.h"
class DynamicFontImportSettingsData;
+class EditorFileDialog;
+class EditorInspector;
+class EditorLocaleDialog;
class DynamicFontImportSettings : public ConfirmationDialog {
GDCLASS(DynamicFontImportSettings, ConfirmationDialog)
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index cf3464b168..f7d373ef60 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor_import_plugin.h"
+
#include "core/object/script_language.h"
EditorImportPlugin::EditorImportPlugin() {
diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp
index 69e3311fe6..7071042818 100644
--- a/editor/import/resource_importer_layered_texture.cpp
+++ b/editor/import/resource_importer_layered_texture.cpp
@@ -30,8 +30,7 @@
#include "resource_importer_layered_texture.h"
-#include "resource_importer_texture.h"
-
+#include "core/config/project_settings.h"
#include "core/error/error_macros.h"
#include "core/io/config_file.h"
#include "core/io/image_loader.h"
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 127cd4511e..6f41855cce 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -30,6 +30,7 @@
#include "resource_importer_texture.h"
+#include "core/config/project_settings.h"
#include "core/io/config_file.h"
#include "core/io/image_loader.h"
#include "core/version.h"
diff --git a/editor/import/scene_import_settings.cpp b/editor/import/scene_import_settings.cpp
index eed1888c6a..a3fb753d7f 100644
--- a/editor/import/scene_import_settings.cpp
+++ b/editor/import/scene_import_settings.cpp
@@ -29,9 +29,14 @@
/*************************************************************************/
#include "scene_import_settings.h"
+
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_inspector.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/3d/importer_mesh_instance_3d.h"
+#include "scene/animation/animation_player.h"
#include "scene/resources/importer_mesh.h"
#include "scene/resources/surface_tool.h"
diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h
index 4edf05c7bb..b51f342729 100644
--- a/editor/import/scene_import_settings.h
+++ b/editor/import/scene_import_settings.h
@@ -31,8 +31,6 @@
#ifndef SCENEIMPORTSETTINGS_H
#define SCENEIMPORTSETTINGS_H
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_inspector.h"
#include "editor/import/resource_importer_scene.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
@@ -47,6 +45,8 @@
#include "scene/gui/tree.h"
#include "scene/resources/primitive_meshes.h"
+class EditorFileDialog;
+class EditorInspector;
class SceneImportSettingsData;
class SceneImportSettings : public ConfirmationDialog {
diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp
index 15d3c4b3ee..3ecf084ab1 100644
--- a/editor/import_defaults_editor.cpp
+++ b/editor/import_defaults_editor.cpp
@@ -30,6 +30,15 @@
#include "import_defaults_editor.h"
+#include "core/config/project_settings.h"
+#include "editor/action_map_editor.h"
+#include "editor/editor_autoload_settings.h"
+#include "editor/editor_plugin_settings.h"
+#include "editor/editor_sectioned_inspector.h"
+#include "editor/localization_editor.h"
+#include "editor/shader_globals_editor.h"
+#include "scene/gui/center_container.h"
+
class ImportDefaultsEditorSettings : public Object {
GDCLASS(ImportDefaultsEditorSettings, Object)
friend class ImportDefaultsEditor;
diff --git a/editor/import_defaults_editor.h b/editor/import_defaults_editor.h
index e84e4b6646..8eb6584b1e 100644
--- a/editor/import_defaults_editor.h
+++ b/editor/import_defaults_editor.h
@@ -31,18 +31,11 @@
#ifndef IMPORT_DEFAULTS_EDITOR_H
#define IMPORT_DEFAULTS_EDITOR_H
-#include "core/object/undo_redo.h"
-#include "editor/action_map_editor.h"
-#include "editor/editor_data.h"
-#include "editor/editor_plugin_settings.h"
-#include "editor/editor_sectioned_inspector.h"
-#include "editor/localization_editor.h"
-#include "editor/shader_globals_editor.h"
-#include "editor_autoload_settings.h"
-#include "scene/gui/center_container.h"
+#include "scene/gui/box_container.h"
#include "scene/gui/option_button.h"
class ImportDefaultsEditorSettings;
+class EditorInspector;
class ImportDefaultsEditor : public VBoxContainer {
GDCLASS(ImportDefaultsEditor, VBoxContainer)
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index f809747410..72cc33048c 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -29,9 +29,11 @@
/*************************************************************************/
#include "import_dock.h"
-#include "editor_node.h"
-#include "editor_resource_preview.h"
-#include "editor_scale.h"
+
+#include "core/config/project_settings.h"
+#include "editor/editor_node.h"
+#include "editor/editor_resource_preview.h"
+#include "editor/editor_scale.h"
class ImportDockParameters : public Object {
GDCLASS(ImportDockParameters, Object);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index e36c86fb10..5b3fbe9b51 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -30,6 +30,8 @@
#include "inspector_dock.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/plugins/animation_player_editor_plugin.h"
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
index 9dd3fa2070..81ffc7de6e 100644
--- a/editor/inspector_dock.h
+++ b/editor/inspector_dock.h
@@ -38,9 +38,9 @@
#include "editor/editor_path.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
-#include "scene/gui/control.h"
class EditorNode;
+class EditorFileDialog;
class InspectorDock : public VBoxContainer {
GDCLASS(InspectorDock, VBoxContainer);
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 1e9e2fc09b..401ba02099 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -30,11 +30,13 @@
#include "localization_editor.h"
+#include "core/config/project_settings.h"
#include "core/string/translation.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_translation_parser.h"
-#include "pot_generator.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_translation_parser.h"
+#include "editor/pot_generator.h"
#include "scene/gui/control.h"
void LocalizationEditor::_notification(int p_what) {
diff --git a/editor/localization_editor.h b/editor/localization_editor.h
index cad07dd336..bde1b894e2 100644
--- a/editor/localization_editor.h
+++ b/editor/localization_editor.h
@@ -32,10 +32,11 @@
#define LOCALIZATION_EDITOR_H
#include "core/object/undo_redo.h"
-#include "editor_file_dialog.h"
-#include "editor_locale_dialog.h"
+#include "editor/editor_locale_dialog.h"
#include "scene/gui/tree.h"
+class EditorFileDialog;
+
class LocalizationEditor : public VBoxContainer {
GDCLASS(LocalizationEditor, VBoxContainer);
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index c61380684a..432d1ee4cc 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -31,7 +31,7 @@
#include "multi_node_edit.h"
#include "core/math/math_fieldwise.h"
-#include "editor_node.h"
+#include "editor/editor_node.h"
bool MultiNodeEdit::_set(const StringName &p_name, const Variant &p_value) {
return _set_impl(p_name, p_value, "");
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index 1246ebe0dd..6c3f9c1973 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -31,8 +31,8 @@
#include "node_dock.h"
#include "connections_dialog.h"
-#include "editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
void NodeDock::show_groups() {
groups_button->set_pressed(true);
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 5a98a84717..88a651a7e9 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -33,6 +33,7 @@
#include "canvas_item_editor_plugin.h"
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
bool AbstractPolygon2DEditor::Vertex::operator==(const AbstractPolygon2DEditor::Vertex &p_vertex) const {
diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h
index 8db5bf58dd..28553c77eb 100644
--- a/editor/plugins/abstract_polygon_2d_editor.h
+++ b/editor/plugins/abstract_polygon_2d_editor.h
@@ -31,10 +31,11 @@
#ifndef ABSTRACT_POLYGON_2D_EDITOR_H
#define ABSTRACT_POLYGON_2D_EDITOR_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/polygon_2d.h"
+#include "scene/gui/box_container.h"
+class EditorNode;
class CanvasItemEditor;
class AbstractPolygon2DEditor : public HBoxContainer {
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 3dcb769faf..4156c14a7e 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -31,6 +31,8 @@
#include "animation_blend_space_1d_editor.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/animation/animation_blend_tree.h"
diff --git a/editor/plugins/animation_blend_space_1d_editor.h b/editor/plugins/animation_blend_space_1d_editor.h
index 7906395c8f..54cded6048 100644
--- a/editor/plugins/animation_blend_space_1d_editor.h
+++ b/editor/plugins/animation_blend_space_1d_editor.h
@@ -31,7 +31,6 @@
#ifndef ANIMATION_BLEND_SPACE_1D_EDITOR_H
#define ANIMATION_BLEND_SPACE_1D_EDITOR_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "editor/property_editor.h"
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index f9df8db419..6d876aba44 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -35,6 +35,8 @@
#include "core/io/resource_loader.h"
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
diff --git a/editor/plugins/animation_blend_space_2d_editor.h b/editor/plugins/animation_blend_space_2d_editor.h
index b46efff304..933d2bd96d 100644
--- a/editor/plugins/animation_blend_space_2d_editor.h
+++ b/editor/plugins/animation_blend_space_2d_editor.h
@@ -31,7 +31,6 @@
#ifndef ANIMATION_BLEND_SPACE_2D_EDITOR_H
#define ANIMATION_BLEND_SPACE_2D_EDITOR_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "editor/property_editor.h"
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 40d6bc48e7..14dd782b73 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -34,7 +34,9 @@
#include "core/input/input.h"
#include "core/io/resource_loader.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_inspector.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/menu_button.h"
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h
index 1e55cc8598..a52f901e5f 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.h
+++ b/editor/plugins/animation_blend_tree_editor_plugin.h
@@ -31,7 +31,6 @@
#ifndef ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
#define ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "editor/property_editor.h"
@@ -41,7 +40,9 @@
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"
+class EditorNode;
class ProgressBar;
+class EditorFileDialog;
class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeBlendTreeEditor, AnimationTreeNodeEditorPlugin);
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 320c47e820..1d9a2422da 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -36,10 +36,13 @@
#include "core/io/resource_saver.h"
#include "core/os/keyboard.h"
#include "editor/animation_track_editor.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h" // For onion skinning.
#include "editor/plugins/node_3d_editor_plugin.h" // For onion skinning.
+#include "editor/scene_tree_dock.h"
#include "scene/main/window.h"
#include "scene/resources/animation.h"
#include "scene/scene_string_names.h"
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 06dca11aff..cfd18f39fd 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -31,14 +31,16 @@
#ifndef ANIMATION_PLAYER_EDITOR_PLUGIN_H
#define ANIMATION_PLAYER_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
#include "scene/gui/texture_button.h"
+#include "scene/gui/tree.h"
+class EditorNode;
+class EditorFileDialog;
class AnimationTrackEditor;
class AnimationPlayerEditorPlugin;
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index f750c92fb3..5e32c77511 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -35,6 +35,8 @@
#include "core/io/resource_loader.h"
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index 8970e3e062..208bd27f8e 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -31,7 +31,6 @@
#ifndef ANIMATION_STATE_MACHINE_EDITOR_H
#define ANIMATION_STATE_MACHINE_EDITOR_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "editor/property_editor.h"
@@ -41,6 +40,8 @@
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"
+class EditorFileDialog;
+
class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeStateMachineEditor, AnimationTreeNodeEditorPlugin);
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index adfea236d3..a63ffe94f5 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -39,6 +39,8 @@
#include "core/io/resource_loader.h"
#include "core/math/delaunay_2d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index 14c5658478..6a6ad0acc2 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -31,7 +31,6 @@
#ifndef ANIMATION_TREE_EDITOR_PLUGIN_H
#define ANIMATION_TREE_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/property_editor.h"
#include "scene/animation/animation_tree.h"
@@ -40,6 +39,8 @@
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"
+class EditorNode;
+class EditorFileDialog;
class AnimationTreeNodeEditorPlugin : public VBoxContainer {
GDCLASS(AnimationTreeNodeEditorPlugin, VBoxContainer);
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 7199f69f0b..6fbd2245fa 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -34,6 +34,7 @@
#include "core/io/json.h"
#include "core/os/keyboard.h"
#include "core/version.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index 086d5474ba..245eefbc34 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -34,6 +34,7 @@
#include "core/io/resource_loader.h"
#include "core/os/keyboard.h"
#include "editor/audio_stream_preview.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
diff --git a/editor/plugins/audio_stream_editor_plugin.h b/editor/plugins/audio_stream_editor_plugin.h
index db0e204616..e72bae3659 100644
--- a/editor/plugins/audio_stream_editor_plugin.h
+++ b/editor/plugins/audio_stream_editor_plugin.h
@@ -31,12 +31,12 @@
#ifndef AUDIO_STREAM_EDITOR_PLUGIN_H
#define AUDIO_STREAM_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/audio/audio_stream_player.h"
#include "scene/gui/color_rect.h"
#include "scene/resources/texture.h"
+class EditorNode;
class AudioStreamEditor : public ColorRect {
GDCLASS(AudioStreamEditor, ColorRect);
diff --git a/editor/plugins/camera_3d_editor_plugin.cpp b/editor/plugins/camera_3d_editor_plugin.cpp
index 7c920fa15e..0854dacc9d 100644
--- a/editor/plugins/camera_3d_editor_plugin.cpp
+++ b/editor/plugins/camera_3d_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "camera_3d_editor_plugin.h"
+#include "editor/editor_node.h"
#include "node_3d_editor_plugin.h"
void Camera3DEditor::_node_removed(Node *p_node) {
diff --git a/editor/plugins/camera_3d_editor_plugin.h b/editor/plugins/camera_3d_editor_plugin.h
index e175a931b0..70e82f810b 100644
--- a/editor/plugins/camera_3d_editor_plugin.h
+++ b/editor/plugins/camera_3d_editor_plugin.h
@@ -31,10 +31,11 @@
#ifndef CAMERA_EDITOR_PLUGIN_H
#define CAMERA_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/camera_3d.h"
+class EditorNode;
+
class Camera3DEditor : public Control {
GDCLASS(Camera3DEditor, Control);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index a3ae0d9623..1317c384fd 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -39,8 +39,10 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/editor_toaster.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
+#include "editor/scene_tree_dock.h"
#include "scene/2d/cpu_particles_2d.h"
#include "scene/2d/gpu_particles_2d.h"
#include "scene/2d/light_2d.h"
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 73829b8abe..65db3271fb 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -31,7 +31,6 @@
#ifndef CANVAS_ITEM_EDITOR_PLUGIN_H
#define CANVAS_ITEM_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/editor_zoom_widget.h"
#include "scene/gui/box_container.h"
@@ -39,9 +38,12 @@
#include "scene/gui/label.h"
#include "scene/gui/panel_container.h"
#include "scene/gui/spin_box.h"
+#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/main/canvas_item.h"
+class EditorNode;
+class EditorData;
class CanvasItemEditorViewport;
class ViewPanner;
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 894b1dd160..311acb8629 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "canvas_item_editor_plugin.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
#include "scene/resources/concave_polygon_shape_2d.h"
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index 1c01b7019f..048d07ce2b 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -31,11 +31,11 @@
#ifndef COLLISION_SHAPE_2D_EDITOR_PLUGIN_H
#define COLLISION_SHAPE_2D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/collision_shape_2d.h"
+class EditorNode;
class CanvasItemEditor;
class CollisionShape2DEditor : public Control {
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index e0364dc952..43a89f9cd3 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -32,6 +32,8 @@
#include "canvas_item_editor_plugin.h"
#include "core/io/image_loader.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "scene/2d/cpu_particles_2d.h"
#include "scene/gui/separator.h"
#include "scene/resources/particles_material.h"
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.h b/editor/plugins/cpu_particles_2d_editor_plugin.h
index e54e1651bd..9922f04049 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.h
@@ -31,12 +31,15 @@
#ifndef CPU_PARTICLES_2D_EDITOR_PLUGIN_H
#define CPU_PARTICLES_2D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/cpu_particles_2d.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/file_dialog.h"
+
+class EditorNode;
+class EditorPlugin;
+class SpinBox;
+class EditorFileDialog;
class CPUParticles2DEditorPlugin : public EditorPlugin {
GDCLASS(CPUParticles2DEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.cpp b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
index bb10c04e8f..d85d6b13e7 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
@@ -30,7 +30,10 @@
#include "cpu_particles_3d_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/plugins/node_3d_editor_plugin.h"
+#include "editor/scene_tree_editor.h"
+#include "scene/gui/menu_button.h"
void CPUParticles3DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.h b/editor/plugins/cpu_particles_3d_editor_plugin.h
index 67cc156680..4b2cd0dd8c 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.h
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.h
@@ -34,6 +34,8 @@
#include "editor/plugins/gpu_particles_3d_editor_plugin.h"
#include "scene/3d/cpu_particles_3d.h"
+class EditorNode;
+
class CPUParticles3DEditor : public GPUParticles3DEditorBase {
GDCLASS(CPUParticles3DEditor, GPUParticles3DEditorBase);
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index a9a276fc18..7abf66dac6 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -34,6 +34,7 @@
#include "core/core_string_names.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
CurveEditor::CurveEditor() {
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index c7e8dea75a..2a90f6cfc9 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -31,11 +31,12 @@
#ifndef CURVE_EDITOR_PLUGIN_H
#define CURVE_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/editor_resource_preview.h"
#include "scene/resources/curve.h"
+class EditorNode;
+
// Edits a y(x) curve
class CurveEditor : public Control {
GDCLASS(CurveEditor, Control);
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index d23b52014e..5dd92d3c3f 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -30,6 +30,7 @@
#include "editor_preview_plugins.h"
+#include "core/config/project_settings.h"
#include "core/io/file_access_memory.h"
#include "core/io/resource_loader.h"
#include "core/os/os.h"
diff --git a/editor/plugins/font_editor_plugin.cpp b/editor/plugins/font_editor_plugin.cpp
index 73a6781774..f7015608a1 100644
--- a/editor/plugins/font_editor_plugin.cpp
+++ b/editor/plugins/font_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "font_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
void FontDataPreview::_notification(int p_what) {
diff --git a/editor/plugins/font_editor_plugin.h b/editor/plugins/font_editor_plugin.h
index 736137121a..ef3c8efccf 100644
--- a/editor/plugins/font_editor_plugin.h
+++ b/editor/plugins/font_editor_plugin.h
@@ -31,11 +31,12 @@
#ifndef FONT_EDITOR_PLUGIN_H
#define FONT_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/resources/font.h"
#include "scene/resources/text_line.h"
+class EditorNode;
+
class FontDataPreview : public Control {
GDCLASS(FontDataPreview, Control);
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
index 06be9d678f..68d665f059 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
@@ -32,6 +32,9 @@
#include "canvas_item_editor_plugin.h"
#include "core/io/image_loader.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/scene_tree_dock.h"
#include "scene/2d/cpu_particles_2d.h"
#include "scene/gui/separator.h"
#include "scene/resources/particles_material.h"
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.h b/editor/plugins/gpu_particles_2d_editor_plugin.h
index 55e455e252..c2f3059542 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.h
@@ -31,12 +31,14 @@
#ifndef PARTICLES_2D_EDITOR_PLUGIN_H
#define PARTICLES_2D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/gpu_particles_2d.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/file_dialog.h"
+#include "scene/gui/spin_box.h"
+
+class EditorNode;
+class EditorFileDialog;
class GPUParticles2DEditorPlugin : public EditorPlugin {
GDCLASS(GPUParticles2DEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 087b0a26b7..45ac58eb5a 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -31,7 +31,9 @@
#include "gpu_particles_3d_editor_plugin.h"
#include "core/io/resource_loader.h"
+#include "editor/editor_node.h"
#include "editor/plugins/node_3d_editor_plugin.h"
+#include "editor/scene_tree_dock.h"
#include "scene/3d/cpu_particles_3d.h"
#include "scene/resources/particles_material.h"
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.h b/editor/plugins/gpu_particles_3d_editor_plugin.h
index f7e4244ba4..37d660090a 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.h
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.h
@@ -31,11 +31,13 @@
#ifndef PARTICLES_EDITOR_PLUGIN_H
#define PARTICLES_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/gpu_particles_3d.h"
#include "scene/gui/spin_box.h"
+class EditorNode;
+class SceneTreeDialog;
+
class GPUParticles3DEditorBase : public Control {
GDCLASS(GPUParticles3DEditorBase, Control);
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
index 1b4c944876..92a074ce60 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
@@ -30,6 +30,9 @@
#include "gpu_particles_collision_sdf_editor_plugin.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+
void GPUParticlesCollisionSDF3DEditorPlugin::_bake() {
if (col_sdf) {
if (col_sdf->get_texture().is_null() || !col_sdf->get_texture()->get_path().is_resource_file()) {
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
index d74986f22b..c1d5e3194b 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
@@ -31,11 +31,14 @@
#ifndef GPU_PARTICLES_COLLISION_SDF_EDITOR_PLUGIN_H
#define GPU_PARTICLES_COLLISION_SDF_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/gpu_particles_collision_3d.h"
#include "scene/resources/material.h"
+class EditorNode;
+struct EditorProgress;
+class EditorFileDialog;
+
class GPUParticlesCollisionSDF3DEditorPlugin : public EditorPlugin {
GDCLASS(GPUParticlesCollisionSDF3DEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 5e300d3de9..6165915bdd 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -31,6 +31,7 @@
#include "gradient_editor_plugin.h"
#include "canvas_item_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "node_3d_editor_plugin.h"
diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h
index 8239711667..f0aca15bfe 100644
--- a/editor/plugins/gradient_editor_plugin.h
+++ b/editor/plugins/gradient_editor_plugin.h
@@ -31,10 +31,11 @@
#ifndef GRADIENT_EDITOR_PLUGIN_H
#define GRADIENT_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/gui/gradient_edit.h"
+class EditorNode;
+
class GradientEditor : public GradientEdit {
GDCLASS(GradientEditor, GradientEdit);
diff --git a/editor/plugins/input_event_editor_plugin.cpp b/editor/plugins/input_event_editor_plugin.cpp
index b0ee88479a..bf31d9a96b 100644
--- a/editor/plugins/input_event_editor_plugin.cpp
+++ b/editor/plugins/input_event_editor_plugin.cpp
@@ -30,6 +30,8 @@
#include "input_event_editor_plugin.h"
+#include "editor/editor_node.h"
+
void InputEventConfigContainer::_bind_methods() {
}
diff --git a/editor/plugins/input_event_editor_plugin.h b/editor/plugins/input_event_editor_plugin.h
index ed26890229..fde2f0a5e8 100644
--- a/editor/plugins/input_event_editor_plugin.h
+++ b/editor/plugins/input_event_editor_plugin.h
@@ -33,7 +33,8 @@
#include "editor/action_map_editor.h"
#include "editor/editor_inspector.h"
-#include "editor/editor_node.h"
+
+class EditorNode;
class InputEventConfigContainer : public HBoxContainer {
GDCLASS(InputEventConfigContainer, HBoxContainer);
diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp
index 2126ca1bc9..5f5e95bc7d 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.cpp
+++ b/editor/plugins/lightmap_gi_editor_plugin.cpp
@@ -30,6 +30,9 @@
#include "lightmap_gi_editor_plugin.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+
void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
if (lightmap) {
LightmapGI::BakeError err;
diff --git a/editor/plugins/lightmap_gi_editor_plugin.h b/editor/plugins/lightmap_gi_editor_plugin.h
index 5eec972228..84c3947e0b 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.h
+++ b/editor/plugins/lightmap_gi_editor_plugin.h
@@ -31,11 +31,14 @@
#ifndef BAKED_LIGHTMAP_EDITOR_PLUGIN_H
#define BAKED_LIGHTMAP_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/lightmap_gi.h"
#include "scene/resources/material.h"
+class EditorNode;
+struct EditorProgress;
+class EditorFileDialog;
+
class LightmapGIEditorPlugin : public EditorPlugin {
GDCLASS(LightmapGIEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 9d45c365a8..b3b5abf9c4 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "material_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/subviewport_container.h"
#include "scene/resources/fog_material.h"
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 53f4513396..f1f60d180f 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -34,7 +34,6 @@
#include "editor/property_editor.h"
#include "scene/resources/primitive_meshes.h"
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
@@ -42,6 +41,7 @@
#include "scene/gui/color_rect.h"
#include "scene/resources/material.h"
+class EditorNode;
class SubViewportContainer;
class MaterialEditor : public Control {
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index daf68f247d..8c9bbf058e 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "mesh_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
void MeshEditor::gui_input(const Ref<InputEvent> &p_event) {
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 613680e870..83838bc1fe 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -31,7 +31,6 @@
#ifndef MESH_EDITOR_PLUGIN_H
#define MESH_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
@@ -39,6 +38,8 @@
#include "scene/gui/subviewport_container.h"
#include "scene/resources/material.h"
+class EditorNode;
+
class MeshEditor : public SubViewportContainer {
GDCLASS(MeshEditor, SubViewportContainer);
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 75e9cc23a1..4888f29b7b 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "mesh_instance_3d_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "node_3d_editor_plugin.h"
#include "scene/3d/collision_shape_3d.h"
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.h b/editor/plugins/mesh_instance_3d_editor_plugin.h
index 1df72d107c..14829a4ef3 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.h
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.h
@@ -31,11 +31,12 @@
#ifndef MESH_INSTANCE_EDITOR_PLUGIN_H
#define MESH_INSTANCE_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/spin_box.h"
+class EditorNode;
+
class MeshInstance3DEditor : public Control {
GDCLASS(MeshInstance3DEditor, Control);
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index e47381b8a0..23ba3d4cf4 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "mesh_library_editor_plugin.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "main/main.h"
diff --git a/editor/plugins/mesh_library_editor_plugin.h b/editor/plugins/mesh_library_editor_plugin.h
index 7144f87ba6..c459478db7 100644
--- a/editor/plugins/mesh_library_editor_plugin.h
+++ b/editor/plugins/mesh_library_editor_plugin.h
@@ -31,9 +31,14 @@
#ifndef MESH_LIBRARY_EDITOR_PLUGIN_H
#define MESH_LIBRARY_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
#include "scene/resources/mesh_library.h"
+class EditorNode;
+class EditorFileDialog;
+class ConfirmationDialog;
+class MenuButton;
+
class MeshLibraryEditor : public Control {
GDCLASS(MeshLibraryEditor, Control);
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 4ec65ea257..cef34a4909 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -30,6 +30,8 @@
#include "multimesh_editor_plugin.h"
+#include "editor/editor_node.h"
+#include "editor/scene_tree_editor.h"
#include "node_3d_editor_plugin.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/box_container.h"
diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h
index ae18edd90a..03f8921dfb 100644
--- a/editor/plugins/multimesh_editor_plugin.h
+++ b/editor/plugins/multimesh_editor_plugin.h
@@ -31,11 +31,14 @@
#ifndef MULTIMESH_EDITOR_PLUGIN_H
#define MULTIMESH_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/multimesh_instance_3d.h"
+#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
+class EditorNode;
+class SceneTreeDialog;
+
class MultiMeshEditor : public Control {
GDCLASS(MultiMeshEditor, Control);
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index b4b1cf05ac..9f432a1fc7 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -33,6 +33,8 @@
#include "core/math/convex_hull.h"
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
+#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "scene/3d/audio_listener_3d.h"
#include "scene/3d/audio_stream_player_3d.h"
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 5f58724594..d62bb3814f 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -42,6 +42,7 @@
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/node_3d_editor_gizmos.h"
#include "editor/plugins/script_editor_plugin.h"
+#include "editor/scene_tree_dock.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/collision_shape_3d.h"
#include "scene/3d/light_3d.h"
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 333702fd94..76915a349e 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -31,19 +31,24 @@
#ifndef NODE_3D_EDITOR_PLUGIN_H
#define NODE_3D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/editor_scale.h"
+#include "editor/editor_spin_slider.h"
#include "editor/plugins/node_3d_editor_gizmos.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
#include "scene/3d/visual_instance_3d.h"
#include "scene/3d/world_environment.h"
+#include "scene/gui/color_picker.h"
#include "scene/gui/panel_container.h"
+#include "scene/gui/spin_box.h"
+#include "scene/gui/split_container.h"
#include "scene/resources/environment.h"
#include "scene/resources/fog_material.h"
#include "scene/resources/sky_material.h"
+class EditorNode;
+class EditorData;
class Node3DEditor;
class Node3DEditorViewport;
class SubViewportContainer;
diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.cpp b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
index e7fe8da716..16f359a2ae 100644
--- a/editor/plugins/occluder_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
@@ -30,6 +30,9 @@
#include "occluder_instance_3d_editor_plugin.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+
void OccluderInstance3DEditorPlugin::_bake_select_file(const String &p_file) {
if (occluder_instance) {
OccluderInstance3D::BakeError err;
diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.h b/editor/plugins/occluder_instance_3d_editor_plugin.h
index a9aa0b74e3..f1c6b504be 100644
--- a/editor/plugins/occluder_instance_3d_editor_plugin.h
+++ b/editor/plugins/occluder_instance_3d_editor_plugin.h
@@ -31,11 +31,14 @@
#ifndef OCCLUDER_INSTANCE_3D_EDITOR_PLUGIN_H
#define OCCLUDER_INSTANCE_3D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/occluder_instance_3d.h"
#include "scene/resources/material.h"
+class EditorNode;
+struct EditorProgress;
+class EditorFileDialog;
+
class OccluderInstance3DEditorPlugin : public EditorPlugin {
GDCLASS(OccluderInstance3DEditorPlugin, EditorPlugin);
diff --git a/editor/plugins/ot_features_plugin.cpp b/editor/plugins/ot_features_plugin.cpp
index d2daa4fa8d..df6d50e195 100644
--- a/editor/plugins/ot_features_plugin.cpp
+++ b/editor/plugins/ot_features_plugin.cpp
@@ -30,6 +30,7 @@
#include "ot_features_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
void OpenTypeFeaturesEditor::_value_changed(double val) {
diff --git a/editor/plugins/ot_features_plugin.h b/editor/plugins/ot_features_plugin.h
index 073fe53a52..f1d084a6b4 100644
--- a/editor/plugins/ot_features_plugin.h
+++ b/editor/plugins/ot_features_plugin.h
@@ -31,10 +31,11 @@
#ifndef OT_FEATURES_PLUGIN_H
#define OT_FEATURES_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/editor_properties.h"
+class EditorNode;
+
/*************************************************************************/
class OpenTypeFeaturesEditor : public EditorProperty {
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 702bc4a8ce..3d8543e1bd 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "canvas_item_editor_plugin.h"
#include "core/io/file_access.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h
index 210a5a140d..95f58cd18c 100644
--- a/editor/plugins/path_2d_editor_plugin.h
+++ b/editor/plugins/path_2d_editor_plugin.h
@@ -31,10 +31,11 @@
#ifndef PATH_2D_EDITOR_PLUGIN_H
#define PATH_2D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/path_2d.h"
+#include "scene/gui/separator.h"
+class EditorNode;
class CanvasItemEditor;
class Path2DEditor : public HBoxContainer {
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 7cc926f06c..3da70fb8a0 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "node_3d_editor_plugin.h"
#include "scene/resources/curve.h"
diff --git a/editor/plugins/path_3d_editor_plugin.h b/editor/plugins/path_3d_editor_plugin.h
index b877e2ae17..8295101279 100644
--- a/editor/plugins/path_3d_editor_plugin.h
+++ b/editor/plugins/path_3d_editor_plugin.h
@@ -35,6 +35,9 @@
#include "editor/plugins/node_3d_editor_gizmos.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/path_3d.h"
+#include "scene/gui/separator.h"
+
+class EditorNode;
class Path3DGizmo : public EditorNode3DGizmo {
GDCLASS(Path3DGizmo, EditorNode3DGizmo);
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp
index 9d69bbaa0b..333b4d0f30 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.cpp
+++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "physical_bone_3d_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "scene/3d/physics_body_3d.h"
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.h b/editor/plugins/physical_bone_3d_editor_plugin.h
index d30222d7e6..5632be73e7 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.h
+++ b/editor/plugins/physical_bone_3d_editor_plugin.h
@@ -31,7 +31,12 @@
#ifndef PHYSICAL_BONE_PLUGIN_H
#define PHYSICAL_BONE_PLUGIN_H
-#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
+#include "scene/3d/physics_body_3d.h"
+#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
+
+class EditorNode;
class PhysicalBone3DEditor : public Object {
GDCLASS(PhysicalBone3DEditor, Object);
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index b116f8ff6d..0ca5967fa6 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -38,7 +38,10 @@
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "scene/2d/skeleton_2d.h"
+#include "scene/gui/menu_button.h"
#include "scene/gui/scroll_container.h"
+#include "scene/gui/separator.h"
+#include "scene/gui/slider.h"
#include "scene/gui/view_panner.h"
Node2D *Polygon2DEditor::_get_node() const {
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 0f10b6b645..3793a0130c 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -35,6 +35,9 @@
class ViewPanner;
class ScrollContainer;
+class Panel;
+class HSlider;
+class SpinBox;
class Polygon2DEditor : public AbstractPolygon2DEditor {
GDCLASS(Polygon2DEditor, AbstractPolygon2DEditor);
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index 4014da2441..140c2cea75 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -36,6 +36,7 @@
#include "core/io/file_access.h"
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "node_3d_editor_plugin.h"
#include "scene/3d/camera_3d.h"
diff --git a/editor/plugins/polygon_3d_editor_plugin.h b/editor/plugins/polygon_3d_editor_plugin.h
index 6b0370541e..d987c78670 100644
--- a/editor/plugins/polygon_3d_editor_plugin.h
+++ b/editor/plugins/polygon_3d_editor_plugin.h
@@ -31,12 +31,12 @@
#ifndef POLYGON_3D_EDITOR_PLUGIN_H
#define POLYGON_3D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/collision_polygon_3d.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/resources/immediate_mesh.h"
+class EditorNode;
class CanvasItemEditor;
class Polygon3DEditor : public HBoxContainer {
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 786217a5c2..398e6eb044 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -32,6 +32,8 @@
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index 838d72df41..561bb60354 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -31,13 +31,15 @@
#ifndef RESOURCE_PRELOADER_EDITOR_PLUGIN_H
#define RESOURCE_PRELOADER_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
#include "scene/gui/tree.h"
#include "scene/main/resource_preloader.h"
+class EditorNode;
+struct EditorProgress;
+class EditorFileDialog;
+
class ResourcePreloaderEditor : public PanelContainer {
GDCLASS(ResourcePreloaderEditor, PanelContainer);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 97d12af544..bf3ab56a45 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -38,6 +38,7 @@
#include "core/os/os.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/debugger/script_editor_debugger.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_run_script.h"
#include "editor/editor_scale.h"
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index d754f1a378..045e8e8c25 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -47,6 +47,10 @@
#include "scene/main/timer.h"
#include "scene/resources/text_file.h"
+class EditorNode;
+struct EditorProgress;
+class EditorFileDialog;
+
class EditorSyntaxHighlighter : public SyntaxHighlighter {
GDCLASS(EditorSyntaxHighlighter, SyntaxHighlighter)
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index c3d61dfd58..4a47766fc0 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -30,6 +30,7 @@
#include "script_text_editor.h"
+#include "core/config/project_settings.h"
#include "core/math/expression.h"
#include "core/os/keyboard.h"
#include "editor/debugger/editor_debugger_node.h"
diff --git a/editor/plugins/shader_file_editor_plugin.h b/editor/plugins/shader_file_editor_plugin.h
index feec0c206e..f4f370d3f0 100644
--- a/editor/plugins/shader_file_editor_plugin.h
+++ b/editor/plugins/shader_file_editor_plugin.h
@@ -41,6 +41,8 @@
#include "scene/main/timer.h"
#include "servers/rendering/rendering_device_binds.h"
+class ItemList;
+
class ShaderFileEditor : public PanelContainer {
GDCLASS(ShaderFileEditor, PanelContainer);
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index b6d465ea81..733d8ff71f 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -31,6 +31,7 @@
#include "skeleton_2d_editor_plugin.h"
#include "canvas_item_editor_plugin.h"
+#include "editor/editor_node.h"
#include "scene/2d/mesh_instance_2d.h"
#include "scene/gui/box_container.h"
#include "thirdparty/misc/clipper.hpp"
diff --git a/editor/plugins/skeleton_2d_editor_plugin.h b/editor/plugins/skeleton_2d_editor_plugin.h
index 2fa7f02622..8054436339 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.h
+++ b/editor/plugins/skeleton_2d_editor_plugin.h
@@ -31,11 +31,12 @@
#ifndef SKELETON_2D_EDITOR_PLUGIN_H
#define SKELETON_2D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/skeleton_2d.h"
#include "scene/gui/spin_box.h"
+class EditorNode;
+
class Skeleton2DEditor : public Control {
GDCLASS(Skeleton2DEditor, Control);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index ac77f51812..774868a33a 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "core/io/resource_saver.h"
#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
#include "editor/plugins/animation_player_editor_plugin.h"
diff --git a/editor/plugins/skeleton_3d_editor_plugin.h b/editor/plugins/skeleton_3d_editor_plugin.h
index d0d81d6498..f3c855c338 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.h
+++ b/editor/plugins/skeleton_3d_editor_plugin.h
@@ -31,7 +31,6 @@
#ifndef SKELETON_3D_EDITOR_PLUGIN_H
#define SKELETON_3D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/editor_properties.h"
#include "node_3d_editor_plugin.h"
@@ -40,6 +39,7 @@
#include "scene/3d/skeleton_3d.h"
#include "scene/resources/immediate_mesh.h"
+class EditorNode;
class EditorInspectorPluginSkeleton;
class Joint;
class PhysicalBone3D;
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
index ca8786a385..dbb1be9665 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "skeleton_ik_3d_editor_plugin.h"
+#include "editor/editor_node.h"
#include "scene/3d/skeleton_ik_3d.h"
void SkeletonIK3DEditorPlugin::_play() {
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.h b/editor/plugins/skeleton_ik_3d_editor_plugin.h
index edc3f6dda4..95e84c62b3 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.h
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.h
@@ -31,9 +31,9 @@
#ifndef SKELETON_IK_3D_EDITOR_PLUGIN_H
#define SKELETON_IK_3D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
+class EditorNode;
class SkeletonIK3D;
class SkeletonIK3DEditorPlugin : public EditorPlugin {
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 85ff20dd23..708ba7c550 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -32,7 +32,9 @@
#include "canvas_item_editor_plugin.h"
#include "core/math/geometry_2d.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "editor/scene_tree_dock.h"
#include "scene/2d/collision_polygon_2d.h"
#include "scene/2d/light_occluder_2d.h"
#include "scene/2d/mesh_instance_2d.h"
diff --git a/editor/plugins/sprite_2d_editor_plugin.h b/editor/plugins/sprite_2d_editor_plugin.h
index c93ad1610f..46c1d62209 100644
--- a/editor/plugins/sprite_2d_editor_plugin.h
+++ b/editor/plugins/sprite_2d_editor_plugin.h
@@ -31,11 +31,12 @@
#ifndef SPRITE_EDITOR_PLUGIN_H
#define SPRITE_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/sprite_2d.h"
#include "scene/gui/spin_box.h"
+class EditorNode;
+
class Sprite2DEditor : public Control {
GDCLASS(Sprite2DEditor, Control);
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 419076a3f6..5e0a53e354 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -33,8 +33,11 @@
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
+#include "editor/scene_tree_dock.h"
#include "scene/3d/sprite_3d.h"
#include "scene/gui/center_container.h"
#include "scene/gui/margin_container.h"
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 8767e05a94..27ebdfef93 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -31,16 +31,22 @@
#ifndef SPRITE_FRAMES_EDITOR_PLUGIN_H
#define SPRITE_FRAMES_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/animated_sprite_2d.h"
+#include "scene/gui/button.h"
+#include "scene/gui/check_button.h"
#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
+#include "scene/gui/item_list.h"
#include "scene/gui/scroll_container.h"
+#include "scene/gui/spin_box.h"
#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
+class EditorNode;
+struct EditorProgress;
+class EditorFileDialog;
+
class SpriteFramesEditor : public HSplitContainer {
GDCLASS(SpriteFramesEditor, HSplitContainer);
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index 5d38352b22..e2a66f5a3c 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "style_box_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
bool EditorInspectorPluginStyleBox::can_handle(Object *p_object) {
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index 898628fd7f..d140023a42 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -32,11 +32,13 @@
#define STYLE_BOX_EDITOR_PLUGIN_H
#include "editor/editor_inspector.h"
-#include "editor/editor_node.h"
+#include "editor/editor_plugin.h"
#include "scene/gui/option_button.h"
#include "scene/gui/texture_rect.h"
#include "scene/resources/style_box.h"
+class EditorNode;
+
class StyleBoxPreview : public VBoxContainer {
GDCLASS(StyleBoxPreview, VBoxContainer);
diff --git a/editor/plugins/sub_viewport_preview_editor_plugin.cpp b/editor/plugins/sub_viewport_preview_editor_plugin.cpp
index 4498a1d64d..859a99ce96 100644
--- a/editor/plugins/sub_viewport_preview_editor_plugin.cpp
+++ b/editor/plugins/sub_viewport_preview_editor_plugin.cpp
@@ -30,6 +30,8 @@
#include "sub_viewport_preview_editor_plugin.h"
+#include "editor/editor_node.h"
+
bool EditorInspectorPluginSubViewportPreview::can_handle(Object *p_object) {
return Object::cast_to<SubViewport>(p_object) != nullptr;
}
diff --git a/editor/plugins/sub_viewport_preview_editor_plugin.h b/editor/plugins/sub_viewport_preview_editor_plugin.h
index 7016910ebd..e7e28f3e33 100644
--- a/editor/plugins/sub_viewport_preview_editor_plugin.h
+++ b/editor/plugins/sub_viewport_preview_editor_plugin.h
@@ -31,11 +31,12 @@
#ifndef SUB_VIEWPORT_PREVIEW_EDITOR_PLUGIN_H
#define SUB_VIEWPORT_PREVIEW_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/texture_editor_plugin.h"
#include "scene/main/viewport.h"
+class EditorNode;
+
class EditorInspectorPluginSubViewportPreview : public EditorInspectorPluginTexture {
GDCLASS(EditorInspectorPluginSubViewportPreview, EditorInspectorPluginTexture);
diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp
index 4ce94176e5..d05fd7dc9c 100644
--- a/editor/plugins/text_control_editor_plugin.cpp
+++ b/editor/plugins/text_control_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "text_control_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/multi_node_edit.h"
diff --git a/editor/plugins/text_control_editor_plugin.h b/editor/plugins/text_control_editor_plugin.h
index 5941c100ec..0549375a07 100644
--- a/editor/plugins/text_control_editor_plugin.h
+++ b/editor/plugins/text_control_editor_plugin.h
@@ -34,8 +34,8 @@
#include "canvas_item_editor_plugin.h"
#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
+#include "scene/gui/color_picker.h"
#include "scene/gui/color_rect.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/option_button.h"
@@ -43,6 +43,8 @@
/*************************************************************************/
+class EditorNode;
+
class TextControlEditor : public HBoxContainer {
GDCLASS(TextControlEditor, HBoxContainer);
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 6080f9df87..c9090f5459 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
+#include "editor/editor_node.h"
#include "editor/editor_settings.h"
void Texture3DEditor::_texture_rect_draw() {
diff --git a/editor/plugins/texture_3d_editor_plugin.h b/editor/plugins/texture_3d_editor_plugin.h
index 5a200f6c11..b107d8e984 100644
--- a/editor/plugins/texture_3d_editor_plugin.h
+++ b/editor/plugins/texture_3d_editor_plugin.h
@@ -31,11 +31,13 @@
#ifndef TEXTURE_3D_EDITOR_PLUGIN_H
#define TEXTURE_3D_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
+#include "scene/gui/spin_box.h"
#include "scene/resources/shader.h"
#include "scene/resources/texture.h"
+class EditorNode;
+
class Texture3DEditor : public Control {
GDCLASS(Texture3DEditor, Control);
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 84b33f0986..f6b41b4e37 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "texture_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
TextureRect *TexturePreview::get_texture_display() {
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 5ba077d6fc..97ce4fd59d 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -31,10 +31,11 @@
#ifndef TEXTURE_EDITOR_PLUGIN_H
#define TEXTURE_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/resources/texture.h"
+class EditorNode;
+
class TexturePreview : public MarginContainer {
GDCLASS(TexturePreview, MarginContainer);
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index a8c37d37fe..bafe2a7c55 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
+#include "editor/editor_node.h"
#include "editor/editor_settings.h"
void TextureLayeredEditor::gui_input(const Ref<InputEvent> &p_event) {
diff --git a/editor/plugins/texture_layered_editor_plugin.h b/editor/plugins/texture_layered_editor_plugin.h
index cd8eba1bfe..b55c6a1db5 100644
--- a/editor/plugins/texture_layered_editor_plugin.h
+++ b/editor/plugins/texture_layered_editor_plugin.h
@@ -31,11 +31,13 @@
#ifndef TEXTURE_LAYERED_EDITOR_PLUGIN_H
#define TEXTURE_LAYERED_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
+#include "scene/gui/spin_box.h"
#include "scene/resources/shader.h"
#include "scene/resources/texture.h"
+class EditorNode;
+
class TextureLayeredEditor : public Control {
GDCLASS(TextureLayeredEditor, Control);
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 662c0126ec..c924b78602 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "core/core_string_names.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/check_box.h"
#include "scene/gui/view_panner.h"
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index d78ad3891c..664b9ebce5 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -32,7 +32,6 @@
#define TEXTURE_REGION_EDITOR_PLUGIN_H
#include "canvas_item_editor_plugin.h"
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/2d/sprite_2d.h"
#include "scene/3d/sprite_3d.h"
@@ -40,6 +39,7 @@
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
+class EditorNode;
class ViewPanner;
class TextureRegionEditor : public VBoxContainer {
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 50ca20b2a5..2cfaaea0a7 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -31,6 +31,8 @@
#include "theme_editor_plugin.h"
#include "core/os/keyboard.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_resource_picker.h"
#include "editor/editor_scale.h"
#include "editor/progress_dialog.h"
diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h
index af54c3ce83..ee9c20a8f2 100644
--- a/editor/plugins/theme_editor_plugin.h
+++ b/editor/plugins/theme_editor_plugin.h
@@ -31,16 +31,21 @@
#ifndef THEME_EDITOR_PLUGIN_H
#define THEME_EDITOR_PLUGIN_H
+#include "editor/editor_plugin.h"
+#include "editor/plugins/theme_editor_preview.h"
+#include "scene/gui/check_button.h"
#include "scene/gui/dialogs.h"
+#include "scene/gui/item_list.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/option_button.h"
#include "scene/gui/scroll_container.h"
#include "scene/gui/tab_bar.h"
#include "scene/gui/texture_rect.h"
+#include "scene/gui/tree.h"
#include "scene/resources/theme.h"
-#include "theme_editor_preview.h"
-#include "editor/editor_node.h"
+class EditorNode;
+class EditorFileDialog;
class ThemeItemImportTree : public VBoxContainer {
GDCLASS(ThemeItemImportTree, VBoxContainer);
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index c4ef6e086d..c3e4e66fd4 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -30,11 +30,15 @@
#include "theme_editor_preview.h"
+#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/math/math_funcs.h"
-#include "scene/resources/packed_scene.h"
-
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "scene/gui/button.h"
+#include "scene/gui/color_picker.h"
+#include "scene/gui/progress_bar.h"
+#include "scene/resources/packed_scene.h"
constexpr double REFRESH_TIMER = 1.5;
diff --git a/editor/plugins/theme_editor_preview.h b/editor/plugins/theme_editor_preview.h
index a509ae3c50..ab93198903 100644
--- a/editor/plugins/theme_editor_preview.h
+++ b/editor/plugins/theme_editor_preview.h
@@ -32,25 +32,13 @@
#define THEME_EDITOR_PREVIEW_H
#include "scene/gui/box_container.h"
-#include "scene/gui/check_box.h"
-#include "scene/gui/check_button.h"
-#include "scene/gui/color_picker.h"
+#include "scene/gui/button.h"
#include "scene/gui/color_rect.h"
-#include "scene/gui/label.h"
#include "scene/gui/margin_container.h"
-#include "scene/gui/menu_button.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/panel.h"
-#include "scene/gui/progress_bar.h"
#include "scene/gui/scroll_container.h"
-#include "scene/gui/separator.h"
-#include "scene/gui/spin_box.h"
-#include "scene/gui/tab_container.h"
-#include "scene/gui/text_edit.h"
-#include "scene/gui/tree.h"
#include "scene/resources/theme.h"
-#include "editor/editor_node.h"
+class EditorNode;
class ThemeEditorPreview : public VBoxContainer {
GDCLASS(ThemeEditorPreview, VBoxContainer);
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index 677c9759c2..0f8c8c616c 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -30,6 +30,8 @@
#include "atlas_merging_dialog.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/control.h"
@@ -251,6 +253,8 @@ void AtlasMergingDialog::update_tile_set(Ref<TileSet> p_tile_set) {
}
AtlasMergingDialog::AtlasMergingDialog() {
+ undo_redo = EditorNode::get_singleton()->get_undo_redo();
+
// Atlas merging window.
set_title(TTR("Atlas Merging"));
set_hide_on_ok(false);
diff --git a/editor/plugins/tiles/atlas_merging_dialog.h b/editor/plugins/tiles/atlas_merging_dialog.h
index 2ae94cf44a..6fc1a3b7e0 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.h
+++ b/editor/plugins/tiles/atlas_merging_dialog.h
@@ -31,7 +31,6 @@
#ifndef ATLAS_MERGING_DIALOG_H
#define ATLAS_MERGING_DIALOG_H
-#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "scene/gui/dialogs.h"
@@ -39,6 +38,9 @@
#include "scene/gui/texture_rect.h"
#include "scene/resources/tile_set.h"
+class EditorNode;
+class EditorFileDialog;
+
class AtlasMergingDialog : public ConfirmationDialog {
GDCLASS(AtlasMergingDialog, ConfirmationDialog);
@@ -49,7 +51,7 @@ private:
LocalVector<Map<Vector2i, Vector2i>> merged_mapping;
Ref<TileSet> tile_set;
- UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ UndoRedo *undo_redo;
// Settings.
int next_line_after_column = 30;
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp
index 35496795e0..44e4faa091 100644
--- a/editor/plugins/tiles/tile_atlas_view.cpp
+++ b/editor/plugins/tiles/tile_atlas_view.cpp
@@ -36,7 +36,6 @@
#include "scene/gui/box_container.h"
#include "scene/gui/label.h"
#include "scene/gui/panel.h"
-#include "scene/gui/texture_rect.h"
#include "scene/gui/view_panner.h"
#include "editor/editor_scale.h"
diff --git a/editor/plugins/tiles/tile_atlas_view.h b/editor/plugins/tiles/tile_atlas_view.h
index 37ef7d6a2a..caf3ef9e4b 100644
--- a/editor/plugins/tiles/tile_atlas_view.h
+++ b/editor/plugins/tiles/tile_atlas_view.h
@@ -37,8 +37,6 @@
#include "scene/gui/center_container.h"
#include "scene/gui/label.h"
#include "scene/gui/margin_container.h"
-#include "scene/gui/scroll_container.h"
-#include "scene/gui/texture_rect.h"
#include "scene/resources/tile_set.h"
class ViewPanner;
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index ae921871c3..a4d2dfc9d9 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -35,6 +35,7 @@
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
+#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
@@ -743,6 +744,8 @@ void GenericTilePolygonEditor::_bind_methods() {
}
GenericTilePolygonEditor::GenericTilePolygonEditor() {
+ editor_undo_redo = EditorNode::get_undo_redo();
+
toolbar = memnew(HBoxContainer);
add_child(toolbar);
@@ -1168,6 +1171,8 @@ void TileDataDefaultEditor::_notification(int p_what) {
}
TileDataDefaultEditor::TileDataDefaultEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
label = memnew(Label);
label->set_text(TTR("Painting:"));
add_child(label);
@@ -1319,6 +1324,8 @@ void TileDataOcclusionShapeEditor::_notification(int p_what) {
}
TileDataOcclusionShapeEditor::TileDataOcclusionShapeEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
polygon_editor = memnew(GenericTilePolygonEditor);
add_child(polygon_editor);
}
@@ -1516,6 +1523,8 @@ void TileDataCollisionEditor::_notification(int p_what) {
}
TileDataCollisionEditor::TileDataCollisionEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
polygon_editor = memnew(GenericTilePolygonEditor);
polygon_editor->set_multiple_polygon_mode(true);
polygon_editor->connect("polygons_changed", callable_mp(this, &TileDataCollisionEditor::_polygons_changed));
@@ -2487,6 +2496,8 @@ void TileDataTerrainsEditor::_notification(int p_what) {
}
TileDataTerrainsEditor::TileDataTerrainsEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
label = memnew(Label);
label->set_text("Painting:");
add_child(label);
@@ -2591,6 +2602,8 @@ void TileDataNavigationEditor::_notification(int p_what) {
}
TileDataNavigationEditor::TileDataNavigationEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
polygon_editor = memnew(GenericTilePolygonEditor);
polygon_editor->set_multiple_polygon_mode(true);
add_child(polygon_editor);
diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h
index e4551d3302..99724760a7 100644
--- a/editor/plugins/tiles/tile_data_editors.h
+++ b/editor/plugins/tiles/tile_data_editors.h
@@ -33,9 +33,7 @@
#include "tile_atlas_view.h"
-#include "editor/editor_node.h"
#include "editor/editor_properties.h"
-
#include "scene/2d/tile_map.h"
#include "scene/gui/box_container.h"
#include "scene/gui/control.h"
@@ -95,7 +93,7 @@ private:
bool multiple_polygon_mode = false;
bool use_undo_redo = true;
- UndoRedo *editor_undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *editor_undo_redo;
// UI
int hovered_polygon_index = -1;
@@ -216,7 +214,7 @@ private:
protected:
DummyObject *dummy_object = memnew(DummyObject);
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
StringName type;
String property;
@@ -281,7 +279,7 @@ private:
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override;
protected:
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
virtual void _tile_set_changed() override;
@@ -316,7 +314,7 @@ class TileDataCollisionEditor : public TileDataDefaultEditor {
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override;
protected:
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
virtual void _tile_set_changed() override;
@@ -368,7 +366,7 @@ protected:
void _notification(int p_what);
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
public:
virtual Control *get_toolbar() override { return toolbar; };
@@ -401,7 +399,7 @@ private:
virtual void _setup_undo_redo_action(TileSetAtlasSource *p_tile_set_atlas_source, Map<TileMapCell, Variant> p_previous_values, Variant p_new_value) override;
protected:
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
virtual void _tile_set_changed() override;
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index 6e3724ead9..5e316bc7f0 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -32,6 +32,7 @@
#include "tiles_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
@@ -1978,7 +1979,11 @@ void TileMapEditorTilesPlugin::_bind_methods() {
}
TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
- CanvasItemEditor::get_singleton()->get_viewport_control()->connect("mouse_exited", callable_mp(this, &TileMapEditorTilesPlugin::_mouse_exited_viewport));
+ undo_redo = EditorNode::get_undo_redo();
+
+ CanvasItemEditor::get_singleton()
+ ->get_viewport_control()
+ ->connect("mouse_exited", callable_mp(this, &TileMapEditorTilesPlugin::_mouse_exited_viewport));
// --- Shortcuts ---
ED_SHORTCUT("tiles_editor/cut", TTR("Cut"), KeyModifierMask::CMD | Key::X);
@@ -3242,6 +3247,8 @@ void TileMapEditorTerrainsPlugin::edit(ObjectID p_tile_map_id, int p_tile_map_la
}
TileMapEditorTerrainsPlugin::TileMapEditorTerrainsPlugin() {
+ undo_redo = EditorNode::get_undo_redo();
+
main_vbox_container = memnew(VBoxContainer);
main_vbox_container->connect("tree_entered", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme));
main_vbox_container->connect("theme_changed", callable_mp(this, &TileMapEditorTerrainsPlugin::_update_theme));
@@ -3945,6 +3952,8 @@ void TileMapEditor::edit(TileMap *p_tile_map) {
}
TileMapEditor::TileMapEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
set_process_internal(true);
// Shortcuts.
diff --git a/editor/plugins/tiles/tile_map_editor.h b/editor/plugins/tiles/tile_map_editor.h
index 6fa0d01612..49e8cacac8 100644
--- a/editor/plugins/tiles/tile_map_editor.h
+++ b/editor/plugins/tiles/tile_map_editor.h
@@ -35,10 +35,19 @@
#include "core/os/thread.h"
#include "core/typedefs.h"
-#include "editor/editor_node.h"
#include "scene/2d/tile_map.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/check_box.h"
+#include "scene/gui/item_list.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/separator.h"
+#include "scene/gui/spin_box.h"
+#include "scene/gui/split_container.h"
#include "scene/gui/tab_bar.h"
+#include "scene/gui/tree.h"
+
+class EditorNode;
+class UndoRedo;
class TileMapEditorPlugin : public Object {
public:
@@ -61,7 +70,7 @@ class TileMapEditorTilesPlugin : public TileMapEditorPlugin {
GDCLASS(TileMapEditorTilesPlugin, TileMapEditorPlugin);
private:
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
ObjectID tile_map_id;
int tile_map_layer = -1;
virtual void edit(ObjectID p_tile_map_id, int p_tile_map_layer) override;
@@ -212,7 +221,7 @@ class TileMapEditorTerrainsPlugin : public TileMapEditorPlugin {
GDCLASS(TileMapEditorTerrainsPlugin, TileMapEditorPlugin);
private:
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
ObjectID tile_map_id;
int tile_map_layer = -1;
virtual void edit(ObjectID p_tile_map_id, int p_tile_map_layer) override;
@@ -298,7 +307,7 @@ class TileMapEditor : public VBoxContainer {
GDCLASS(TileMapEditor, VBoxContainer);
private:
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
bool tileset_changed_needs_update = false;
ObjectID tile_map_id;
int tile_map_layer = -1;
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
index ad44da8dc9..62f3bd6356 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
@@ -30,6 +30,7 @@
#include "tile_proxies_manager_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
void TileProxiesManagerDialog::_right_clicked(int p_item, Vector2 p_local_mouse_pos, Object *p_item_list) {
@@ -312,6 +313,8 @@ void TileProxiesManagerDialog::update_tile_set(Ref<TileSet> p_tile_set) {
}
TileProxiesManagerDialog::TileProxiesManagerDialog() {
+ undo_redo = EditorNode::get_singleton()->get_undo_redo();
+
// Tile proxy management window.
set_title(TTR("Tile Proxies Management"));
set_process_unhandled_key_input(true);
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.h b/editor/plugins/tiles/tile_proxies_manager_dialog.h
index b235d44982..4c8741c660 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.h
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.h
@@ -31,13 +31,14 @@
#ifndef TILE_PROXIES_MANAGER_DIALOG_H
#define TILE_PROXIES_MANAGER_DIALOG_H
-#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "scene/2d/tile_map.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
+class EditorNode;
+
class TileProxiesManagerDialog : public ConfirmationDialog {
GDCLASS(TileProxiesManagerDialog, ConfirmationDialog);
@@ -45,7 +46,7 @@ private:
int commited_actions_count = 0;
Ref<TileSet> tile_set;
- UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ UndoRedo *undo_redo;
TileMapCell from;
TileMapCell to;
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 1bd1cd0219..9a16e3d682 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -36,6 +36,7 @@
#include "editor/editor_scale.h"
#include "editor/progress_dialog.h"
+#include "editor/editor_node.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
#include "scene/gui/control.h"
@@ -2311,6 +2312,8 @@ void TileSetAtlasSourceEditor::_bind_methods() {
}
TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
set_process_unhandled_key_input(true);
set_process_internal(true);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.h b/editor/plugins/tiles/tile_set_atlas_source_editor.h
index 51771c59ba..f0c8367d57 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.h
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.h
@@ -34,10 +34,10 @@
#include "tile_atlas_view.h"
#include "tile_data_editors.h"
-#include "editor/editor_node.h"
#include "scene/gui/split_container.h"
#include "scene/resources/tile_set.h"
+class EditorNode;
class TileSet;
class TileSetAtlasSourceEditor : public HBoxContainer {
@@ -115,7 +115,7 @@ private:
TileSetAtlasSource *tile_set_atlas_source = nullptr;
int tile_set_atlas_source_id = TileSet::INVALID_SOURCE;
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
bool tile_set_changed_needs_update = false;
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index ab355d4658..9ca50497af 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -33,6 +33,7 @@
#include "tile_data_editors.h"
#include "tiles_editor_plugin.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "scene/gui/box_container.h"
@@ -657,6 +658,8 @@ void TileSetEditor::edit(Ref<TileSet> p_tile_set) {
TileSetEditor::TileSetEditor() {
singleton = this;
+ undo_redo = EditorNode::get_undo_redo();
+
set_process_internal(true);
// TabBar.
diff --git a/editor/plugins/tiles/tile_set_editor.h b/editor/plugins/tiles/tile_set_editor.h
index a21c951c42..b79b37cf2e 100644
--- a/editor/plugins/tiles/tile_set_editor.h
+++ b/editor/plugins/tiles/tile_set_editor.h
@@ -33,6 +33,7 @@
#include "atlas_merging_dialog.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/tab_bar.h"
#include "scene/resources/tile_set.h"
#include "tile_proxies_manager_dialog.h"
#include "tile_set_atlas_source_editor.h"
@@ -57,7 +58,7 @@ private:
TileSetAtlasSourceEditor *tile_set_atlas_source_editor;
TileSetScenesCollectionSourceEditor *tile_set_scenes_collection_source_editor;
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
void _drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
index 240c017b84..acb6ffc77b 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -30,6 +30,8 @@
#include "tile_set_scenes_collection_source_editor.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_node.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
@@ -452,6 +454,8 @@ void TileSetScenesCollectionSourceEditor::_bind_methods() {
}
TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
+ undo_redo = EditorNode::get_undo_redo();
+
// -- Right side --
HSplitContainer *split_container_right_side = memnew(HSplitContainer);
split_container_right_side->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
index 5b48ea4762..bc4e975c8d 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.h
@@ -31,10 +31,15 @@
#ifndef TILE_SET_SCENES_COLLECTION_SOURCE_EDITOR_H
#define TILE_SET_SCENES_COLLECTION_SOURCE_EDITOR_H
-#include "editor/editor_node.h"
+#include "editor/editor_inspector.h"
#include "scene/gui/box_container.h"
+#include "scene/gui/button.h"
+#include "scene/gui/item_list.h"
#include "scene/resources/tile_set.h"
+class EditorNode;
+class UndoRedo;
+
class TileSetScenesCollectionSourceEditor : public HBoxContainer {
GDCLASS(TileSetScenesCollectionSourceEditor, HBoxContainer);
@@ -93,7 +98,7 @@ private:
TileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr;
int tile_set_source_id = -1;
- UndoRedo *undo_redo = EditorNode::get_undo_redo();
+ UndoRedo *undo_redo;
bool tile_set_scenes_collection_source_changed_needs_update = false;
diff --git a/editor/plugins/version_control_editor_plugin.h b/editor/plugins/version_control_editor_plugin.h
index 86f98ad3aa..956c5a334f 100644
--- a/editor/plugins/version_control_editor_plugin.h
+++ b/editor/plugins/version_control_editor_plugin.h
@@ -33,8 +33,9 @@
#include "editor/editor_plugin.h"
#include "editor/editor_vcs_interface.h"
-#include "scene/gui/container.h"
+#include "scene/gui/box_container.h"
#include "scene/gui/rich_text_label.h"
+#include "scene/gui/split_container.h"
#include "scene/gui/text_edit.h"
#include "scene/gui/tree.h"
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index dd19f3d781..c2ee041737 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -37,6 +37,7 @@
#include "core/math/math_defs.h"
#include "core/os/keyboard.h"
#include "editor/editor_log.h"
+#include "editor/editor_node.h"
#include "editor/editor_properties.h"
#include "editor/editor_scale.h"
#include "scene/animation/animation_player.h"
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index c5037853cd..89f0e51d1c 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -31,7 +31,6 @@
#ifndef VISUAL_SHADER_EDITOR_PLUGIN_H
#define VISUAL_SHADER_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/curve_editor_plugin.h"
#include "editor/property_editor.h"
@@ -41,6 +40,8 @@
#include "scene/gui/tree.h"
#include "scene/resources/visual_shader.h"
+class EditorNode;
+
class VisualShaderNodePlugin : public RefCounted {
GDCLASS(VisualShaderNodePlugin, RefCounted);
diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp
index cef29032b2..9a2af944a0 100644
--- a/editor/plugins/voxel_gi_editor_plugin.cpp
+++ b/editor/plugins/voxel_gi_editor_plugin.cpp
@@ -30,6 +30,9 @@
#include "voxel_gi_editor_plugin.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+
void VoxelGIEditorPlugin::_bake() {
if (voxel_gi) {
if (voxel_gi->get_probe_data().is_null()) {
diff --git a/editor/plugins/voxel_gi_editor_plugin.h b/editor/plugins/voxel_gi_editor_plugin.h
index 4c7865d868..e7c4526747 100644
--- a/editor/plugins/voxel_gi_editor_plugin.h
+++ b/editor/plugins/voxel_gi_editor_plugin.h
@@ -31,11 +31,14 @@
#ifndef VOXEL_GIEDITORPLUGIN_H
#define VOXEL_GIEDITORPLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/voxel_gi.h"
#include "scene/resources/material.h"
+class EditorNode;
+class EditorFileDialog;
+struct EditorProgress;
+
class VoxelGIEditorPlugin : public EditorPlugin {
GDCLASS(VoxelGIEditorPlugin, EditorPlugin);
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index 4d9efefbd3..f6839bae6b 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -32,7 +32,7 @@
#include "core/config/project_settings.h"
#include "core/error/error_macros.h"
-#include "editor_translation_parser.h"
+#include "editor/editor_translation_parser.h"
#include "plugins/packed_scene_translation_parser_plugin.h"
POTGenerator *POTGenerator::singleton = nullptr;
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 1644bd7e7f..ed13afc235 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -32,7 +32,7 @@
#include "core/object/message_queue.h"
#include "core/os/os.h"
-#include "editor_scale.h"
+#include "editor/editor_scale.h"
#include "main/main.h"
#include "servers/display_server.h"
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index b8775cd3ed..21163531d8 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -39,10 +39,10 @@
#include "core/os/os.h"
#include "core/string/optimized_translation.h"
#include "core/version_generated.gen.h"
-#include "editor_data.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
#include "scene/gui/box_container.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/scroll_container.h"
diff --git a/editor/project_export.h b/editor/project_export.h
index 09e402c67f..0f0f0ed83c 100644
--- a/editor/project_export.h
+++ b/editor/project_export.h
@@ -34,7 +34,6 @@
#include "core/io/dir_access.h"
#include "core/os/thread.h"
#include "editor/editor_export.h"
-#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "editor/editor_inspector.h"
#include "editor/editor_properties.h"
@@ -54,6 +53,7 @@
#include "scene/main/timer.h"
class EditorNode;
+class EditorFileDialog;
class ProjectExportDialog : public ConfirmationDialog {
GDCLASS(ProjectExportDialog, ConfirmationDialog);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 57e47a15fd..4dfa310e08 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -30,6 +30,7 @@
#include "project_manager.h"
+#include "core/config/project_settings.h"
#include "core/io/config_file.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
@@ -40,10 +41,10 @@
#include "core/os/os.h"
#include "core/string/translation.h"
#include "core/version.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_themes.h"
#include "editor/editor_vcs_interface.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
-#include "editor_themes.h"
#include "scene/gui/center_container.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/margin_container.h"
@@ -53,6 +54,7 @@
#include "scene/main/window.h"
#include "servers/display_server.h"
#include "servers/navigation_server_3d.h"
+#include "servers/physics_server_2d.h"
static inline String get_project_key_from_path(const String &dir) {
return dir.replace("/", "::");
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index d48c2b76ca..5dc1ddc0a8 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -31,15 +31,16 @@
#ifndef PROJECT_SETTINGS_EDITOR_H
#define PROJECT_SETTINGS_EDITOR_H
+#include "core/config/project_settings.h"
#include "core/object/undo_redo.h"
#include "editor/action_map_editor.h"
+#include "editor/editor_autoload_settings.h"
#include "editor/editor_data.h"
#include "editor/editor_plugin_settings.h"
#include "editor/editor_sectioned_inspector.h"
#include "editor/import_defaults_editor.h"
#include "editor/localization_editor.h"
#include "editor/shader_globals_editor.h"
-#include "editor_autoload_settings.h"
#include "scene/gui/tab_container.h"
class ProjectSettingsEditor : public AcceptDialog {
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 405e263a62..40f7b86ffc 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -44,6 +44,7 @@
#include "editor/create_dialog.h"
#include "editor/dictionary_property_edit.h"
#include "editor/editor_export.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "editor/editor_help.h"
#include "editor/editor_node.h"
@@ -52,6 +53,7 @@
#include "editor/filesystem_dock.h"
#include "editor/multi_node_edit.h"
#include "editor/property_selector.h"
+#include "editor/scene_tree_dock.h"
#include "scene/gui/label.h"
#include "scene/main/window.h"
#include "scene/resources/font.h"
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 298acb3c01..c4287dc115 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -31,7 +31,6 @@
#ifndef PROPERTY_EDITOR_H
#define PROPERTY_EDITOR_H
-#include "editor/editor_file_dialog.h"
#include "editor/editor_locale_dialog.h"
#include "editor/scene_tree_editor.h"
#include "scene/gui/button.h"
@@ -47,8 +46,9 @@
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
-class PropertyValueEvaluator;
class CreateDialog;
+class EditorFileDialog;
+class PropertyValueEvaluator;
class PropertySelector;
class EditorResourceConversionPlugin : public RefCounted {
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 0862efb4ee..825802d852 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -33,7 +33,7 @@
#include "core/os/keyboard.h"
#include "editor/doc_tools.h"
#include "editor/editor_node.h"
-#include "editor_scale.h"
+#include "editor/editor_scale.h"
void PropertySelector::_text_changed(const String &p_newtext) {
_update_search();
diff --git a/editor/property_selector.h b/editor/property_selector.h
index af848b9f18..1e8c6300a0 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -31,8 +31,8 @@
#ifndef PROPERTYSELECTOR_H
#define PROPERTYSELECTOR_H
+#include "editor/editor_help.h"
#include "editor/property_editor.h"
-#include "editor_help.h"
#include "scene/gui/rich_text_label.h"
class PropertySelector : public ConfirmationDialog {
diff --git a/editor/quick_open.h b/editor/quick_open.h
index 00edf46622..dc485a7c86 100644
--- a/editor/quick_open.h
+++ b/editor/quick_open.h
@@ -32,7 +32,7 @@
#define EDITOR_QUICK_OPEN_H
#include "core/templates/oa_hash_map.h"
-#include "editor_file_system.h"
+#include "editor/editor_file_system.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp
index c6a4c0d86a..46751058d0 100644
--- a/editor/rename_dialog.cpp
+++ b/editor/rename_dialog.cpp
@@ -34,10 +34,10 @@
#ifdef MODULE_REGEX_ENABLED
#include "core/string/print_string.h"
-#include "editor_node.h"
-#include "editor_scale.h"
-#include "editor_settings.h"
-#include "editor_themes.h"
+#include "editor/editor_node.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_themes.h"
#include "modules/regex/regex.h"
#include "plugins/script_editor_plugin.h"
#include "scene/gui/control.h"
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index a4f9563840..ed1c396059 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -37,6 +37,7 @@
#include "core/os/keyboard.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_feature_profile.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index e9aed53b4e..f5c46f883d 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -32,6 +32,7 @@
#include "core/object/message_queue.h"
#include "core/string/print_string.h"
+#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/node_dock.h"
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 39fe64b828..f700182681 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -32,8 +32,8 @@
#define SCENE_TREE_EDITOR_H
#include "core/object/undo_redo.h"
-#include "editor_data.h"
-#include "editor_settings.h"
+#include "editor/editor_data.h"
+#include "editor/editor_settings.h"
#include "scene/gui/button.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index b42d4a1d6d..82305c4073 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -35,9 +35,10 @@
#include "core/io/resource_saver.h"
#include "core/string/string_builder.h"
#include "editor/create_dialog.h"
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_file_system.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
-#include "editor_file_system.h"
void ScriptCreateDialog::_notification(int p_what) {
switch (p_what) {
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index 67d30e21fb..aea9649abc 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -32,8 +32,6 @@
#define SCRIPT_CREATE_DIALOG_H
#include "core/object/script_language.h"
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_settings.h"
#include "scene/gui/check_box.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/grid_container.h"
@@ -42,6 +40,7 @@
#include "scene/gui/panel_container.h"
class CreateDialog;
+class EditorFileDialog;
class ScriptCreateDialog : public ConfirmationDialog {
GDCLASS(ScriptCreateDialog, ConfirmationDialog);
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 95c4c5ff0d..3c807548ab 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -29,6 +29,9 @@
/*************************************************************************/
#include "shader_create_dialog.h"
+
+#include "core/config/project_settings.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_scale.h"
#include "scene/resources/visual_shader.h"
#include "servers/rendering/shader_types.h"
diff --git a/editor/shader_create_dialog.h b/editor/shader_create_dialog.h
index be0fef211c..6737ce4f10 100644
--- a/editor/shader_create_dialog.h
+++ b/editor/shader_create_dialog.h
@@ -31,7 +31,6 @@
#ifndef SHADER_CREATE_DIALOG_H
#define SHADER_CREATE_DIALOG_H
-#include "editor/editor_file_dialog.h"
#include "editor/editor_settings.h"
#include "scene/gui/check_box.h"
#include "scene/gui/dialogs.h"
@@ -40,6 +39,8 @@
#include "scene/gui/option_button.h"
#include "scene/gui/panel_container.h"
+class EditorFileDialog;
+
class ShaderCreateDialog : public ConfirmationDialog {
GDCLASS(ShaderCreateDialog, ConfirmationDialog);
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 2f3867a58c..034f6d4857 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -29,7 +29,9 @@
/*************************************************************************/
#include "shader_globals_editor.h"
-#include "editor_node.h"
+
+#include "core/config/project_settings.h"
+#include "editor/editor_node.h"
#include "servers/rendering/shader_language.h"
static const char *global_var_type_names[RS::GLOBAL_VAR_TYPE_MAX] = {
diff --git a/editor/shader_globals_editor.h b/editor/shader_globals_editor.h
index efec9f4219..3b337e07de 100644
--- a/editor/shader_globals_editor.h
+++ b/editor/shader_globals_editor.h
@@ -36,7 +36,6 @@
#include "editor/editor_data.h"
#include "editor/editor_plugin_settings.h"
#include "editor/editor_sectioned_inspector.h"
-#include "scene/gui/dialogs.h"
#include "scene/gui/tab_container.h"
class ShaderGlobalsEditorInterface;
diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index 9e03f50c37..8d436038c1 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -271,7 +271,7 @@
<div id="tab-loader">
<div style="color: #e0e0e0;" id="persistence">
<br />
- <img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: 85%; max-height: 250px" />
+ <img src="logo.svg" alt="Godot Engine logo" width="1024" height="414" style="width: auto; height: auto; max-width: min(85%, 50vh); max-height: 250px" />
<br />
@GODOT_VERSION@
<br />
diff --git a/misc/dist/html/manifest.json b/misc/dist/html/manifest.json
index adc8106e2a..ccfb793b20 100644
--- a/misc/dist/html/manifest.json
+++ b/misc/dist/html/manifest.json
@@ -5,7 +5,6 @@
"lang": "en",
"start_url": "./godot.tools.html",
"display": "standalone",
- "orientation": "landscape",
"theme_color": "#202531",
"icons": [
{
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index 9a6a33fad3..076978c4fb 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "csg_gizmos.h"
+
+#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "scene/3d/camera_3d.h"
diff --git a/modules/fbx/register_types.cpp b/modules/fbx/register_types.cpp
index 3eafb4af45..73e15e38b4 100644
--- a/modules/fbx/register_types.cpp
+++ b/modules/fbx/register_types.cpp
@@ -31,7 +31,7 @@
#include "register_types.h"
#include "editor/editor_node.h"
-#include "editor_scene_importer_fbx.h"
+#include "modules/fbx/editor_scene_importer_fbx.h"
#ifdef TOOLS_ENABLED
static void _editor_init() {
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp
index 33ea078696..868e1b878c 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.cpp
+++ b/modules/gdnative/gdnative_library_editor_plugin.cpp
@@ -30,9 +30,10 @@
#ifdef TOOLS_ENABLED
#include "gdnative_library_editor_plugin.h"
-#include "gdnative.h"
-
+#include "editor/editor_file_dialog.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
+#include "gdnative.h"
void GDNativeLibraryEditor::edit(Ref<GDNativeLibrary> p_library) {
library = p_library;
diff --git a/modules/gdnative/gdnative_library_editor_plugin.h b/modules/gdnative/gdnative_library_editor_plugin.h
index 27848893fa..8d007d207c 100644
--- a/modules/gdnative/gdnative_library_editor_plugin.h
+++ b/modules/gdnative/gdnative_library_editor_plugin.h
@@ -32,8 +32,15 @@
#define GDNATIVE_LIBRARY_EDITOR_PLUGIN_H
#ifdef TOOLS_ENABLED
-#include "editor/editor_node.h"
+
+#include "editor/editor_plugin.h"
#include "gdnative.h"
+#include "scene/gui/control.h"
+#include "scene/gui/menu_button.h"
+#include "scene/gui/tree.h"
+
+class EditorNode;
+class EditorFileDialog;
class GDNativeLibraryEditor : public Control {
GDCLASS(GDNativeLibraryEditor, Control);
diff --git a/modules/gdnative/gdnative_library_singleton_editor.cpp b/modules/gdnative/gdnative_library_singleton_editor.cpp
index 6eb412eccb..e0079f93ee 100644
--- a/modules/gdnative/gdnative_library_singleton_editor.cpp
+++ b/modules/gdnative/gdnative_library_singleton_editor.cpp
@@ -32,6 +32,7 @@
#include "gdnative_library_singleton_editor.h"
#include "gdnative.h"
+#include "core/config/project_settings.h"
#include "editor/editor_node.h"
Set<String> GDNativeLibrarySingletonEditor::_find_singletons_recursive(EditorFileSystemDirectory *p_dir) {
diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp
index ac6684a29c..e3f0ddfc35 100644
--- a/modules/gdscript/editor/gdscript_highlighter.cpp
+++ b/modules/gdscript/editor/gdscript_highlighter.cpp
@@ -31,6 +31,7 @@
#include "gdscript_highlighter.h"
#include "../gdscript.h"
#include "../gdscript_tokenizer.h"
+#include "core/config/project_settings.h"
#include "editor/editor_settings.h"
Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_line) {
diff --git a/modules/gltf/editor_scene_exporter_gltf_plugin.cpp b/modules/gltf/editor_scene_exporter_gltf_plugin.cpp
index fd5741605c..9cae1cd87a 100644
--- a/modules/gltf/editor_scene_exporter_gltf_plugin.cpp
+++ b/modules/gltf/editor_scene_exporter_gltf_plugin.cpp
@@ -30,10 +30,12 @@
#if TOOLS_ENABLED
#include "editor_scene_exporter_gltf_plugin.h"
+
#include "core/config/project_settings.h"
#include "core/error/error_list.h"
#include "core/object/object.h"
#include "core/templates/vector.h"
+#include "editor/editor_file_dialog.h"
#include "editor/editor_file_system.h"
#include "gltf_document.h"
#include "gltf_state.h"
diff --git a/modules/gltf/editor_scene_exporter_gltf_plugin.h b/modules/gltf/editor_scene_exporter_gltf_plugin.h
index e6b15e73c4..99d8911f46 100644
--- a/modules/gltf/editor_scene_exporter_gltf_plugin.h
+++ b/modules/gltf/editor_scene_exporter_gltf_plugin.h
@@ -33,7 +33,6 @@
#if TOOLS_ENABLED
#include "editor/editor_plugin.h"
-
#include "editor_scene_importer_gltf.h"
class SceneExporterGLTFPlugin : public EditorPlugin {
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 84510fc71e..5c0b45865d 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -30,6 +30,7 @@
#include "grid_map_editor_plugin.h"
#include "core/input/input.h"
+#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/plugins/node_3d_editor_plugin.h"
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 37298a1d80..3b54138e36 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -31,10 +31,13 @@
#ifndef GRID_MAP_EDITOR_PLUGIN_H
#define GRID_MAP_EDITOR_PLUGIN_H
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "grid_map.h"
+#include "scene/gui/item_list.h"
+#include "scene/gui/slider.h"
+#include "scene/gui/spin_box.h"
+class EditorNode;
class Node3DEditorPlugin;
class GridMapEditor : public VBoxContainer {
diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp
index 3c02ea0e8e..f7f710f3f1 100644
--- a/modules/mono/editor/editor_internal_calls.cpp
+++ b/modules/mono/editor/editor_internal_calls.cpp
@@ -34,6 +34,7 @@
#include <unistd.h> // access
#endif
+#include "core/config/project_settings.h"
#include "core/os/os.h"
#include "core/version.h"
#include "editor/debugger/editor_debugger_node.h"
diff --git a/modules/navigation/navigation_mesh_editor_plugin.cpp b/modules/navigation/navigation_mesh_editor_plugin.cpp
index 6db3cbc1a3..af02bff4ca 100644
--- a/modules/navigation/navigation_mesh_editor_plugin.cpp
+++ b/modules/navigation/navigation_mesh_editor_plugin.cpp
@@ -33,6 +33,7 @@
#include "core/io/marshalls.h"
#include "core/io/resource_saver.h"
+#include "editor/editor_node.h"
#include "navigation_mesh_generator.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/box_container.h"
diff --git a/modules/navigation/navigation_mesh_editor_plugin.h b/modules/navigation/navigation_mesh_editor_plugin.h
index 6517a7be5b..49ca28d3cf 100644
--- a/modules/navigation/navigation_mesh_editor_plugin.h
+++ b/modules/navigation/navigation_mesh_editor_plugin.h
@@ -33,9 +33,9 @@
#ifdef TOOLS_ENABLED
-#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
+class EditorNode;
class NavigationRegion3D;
class NavigationMeshEditor : public Control {
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index df2d32e152..464488967e 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -30,6 +30,8 @@
#include "export_plugin.h"
+#include "editor/editor_node.h"
+
static const char *android_perms[] = {
"ACCESS_CHECKIN_PROPERTIES",
"ACCESS_COARSE_LOCATION",
diff --git a/platform/android/export/export_plugin.h b/platform/android/export/export_plugin.h
index 9e952ecb8f..c158a273d2 100644
--- a/platform/android/export/export_plugin.h
+++ b/platform/android/export/export_plugin.h
@@ -41,7 +41,6 @@
#include "drivers/png/png_driver_common.h"
#include "editor/editor_export.h"
#include "editor/editor_log.h"
-#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "main/splash.gen.h"
#include "platform/android/logo.gen.h"
diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp
index babd8173d0..9598d2f9fd 100644
--- a/platform/android/export/gradle_export_util.cpp
+++ b/platform/android/export/gradle_export_util.cpp
@@ -30,6 +30,8 @@
#include "gradle_export_util.h"
+#include "core/config/project_settings.h"
+
int _get_android_orientation_value(DisplayServer::ScreenOrientation screen_orientation) {
switch (screen_orientation) {
case DisplayServer::SCREEN_PORTRAIT:
diff --git a/platform/iphone/export/export_plugin.cpp b/platform/iphone/export/export_plugin.cpp
index 122e64d6a1..69c6df8a38 100644
--- a/platform/iphone/export/export_plugin.cpp
+++ b/platform/iphone/export/export_plugin.cpp
@@ -30,6 +30,8 @@
#include "export_plugin.h"
+#include "editor/editor_node.h"
+
void EditorExportPlatformIOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
String driver = ProjectSettings::get_singleton()->get("rendering/driver/driver_name");
// Vulkan and OpenGL ES 3.0 both mandate ETC2 support.
diff --git a/platform/iphone/export/export_plugin.h b/platform/iphone/export/export_plugin.h
index 93b23f7ee2..c01983e39f 100644
--- a/platform/iphone/export/export_plugin.h
+++ b/platform/iphone/export/export_plugin.h
@@ -41,7 +41,6 @@
#include "core/templates/safe_refcount.h"
#include "core/version.h"
#include "editor/editor_export.h"
-#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "main/splash.gen.h"
#include "platform/iphone/logo.gen.h"
diff --git a/platform/javascript/export/export_plugin.cpp b/platform/javascript/export/export_plugin.cpp
index d4c198d631..8a1360e421 100644
--- a/platform/javascript/export/export_plugin.cpp
+++ b/platform/javascript/export/export_plugin.cpp
@@ -30,6 +30,9 @@
#include "export_plugin.h"
+#include "core/config/project_settings.h"
+#include "editor/editor_node.h"
+
Error EditorExportPlatformJavaScript::_extract_template(const String &p_template, const String &p_dir, const String &p_name, bool pwa) {
FileAccess *src_f = nullptr;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
diff --git a/platform/javascript/export/export_plugin.h b/platform/javascript/export/export_plugin.h
index 278e317430..8d4307548c 100644
--- a/platform/javascript/export/export_plugin.h
+++ b/platform/javascript/export/export_plugin.h
@@ -31,18 +31,20 @@
#ifndef JAVASCRIPT_EXPORT_PLUGIN_H
#define JAVASCRIPT_EXPORT_PLUGIN_H
+#include "core/config/project_settings.h"
#include "core/io/image_loader.h"
#include "core/io/stream_peer_ssl.h"
#include "core/io/tcp_server.h"
#include "core/io/zip_io.h"
#include "editor/editor_export.h"
-#include "editor/editor_node.h"
#include "main/splash.gen.h"
#include "platform/javascript/logo.gen.h"
#include "platform/javascript/run_icon.gen.h"
#include "export_server.h"
+class EditorNode;
+
class EditorExportPlatformJavaScript : public EditorExportPlatform {
GDCLASS(EditorExportPlatformJavaScript, EditorExportPlatform);
diff --git a/platform/linuxbsd/os_linuxbsd.h b/platform/linuxbsd/os_linuxbsd.h
index ad6e4cd168..d97a528ece 100644
--- a/platform/linuxbsd/os_linuxbsd.h
+++ b/platform/linuxbsd/os_linuxbsd.h
@@ -39,8 +39,6 @@
#include "drivers/unix/os_unix.h"
#include "joypad_linux.h"
#include "servers/audio_server.h"
-#include "servers/rendering/renderer_compositor.h"
-#include "servers/rendering_server.h"
class OS_LinuxBSD : public OS_Unix {
virtual void delete_main_loop() override;
diff --git a/platform/osx/export/export_plugin.cpp b/platform/osx/export/export_plugin.cpp
index f0b58efb63..4d5c0a827a 100644
--- a/platform/osx/export/export_plugin.cpp
+++ b/platform/osx/export/export_plugin.cpp
@@ -31,6 +31,7 @@
#include "modules/modules_enabled.gen.h" // For regex.
#include "codesign.h"
+#include "editor/editor_node.h"
#include "export_plugin.h"
void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
diff --git a/platform/osx/export/export_plugin.h b/platform/osx/export/export_plugin.h
index 931ce7e41a..b85e9d662c 100644
--- a/platform/osx/export/export_plugin.h
+++ b/platform/osx/export/export_plugin.h
@@ -40,7 +40,6 @@
#include "core/os/os.h"
#include "core/version.h"
#include "editor/editor_export.h"
-#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "platform/osx/logo.gen.h"
diff --git a/platform/uwp/export/app_packager.cpp b/platform/uwp/export/app_packager.cpp
index 9b586a640e..c7b3bc9854 100644
--- a/platform/uwp/export/app_packager.cpp
+++ b/platform/uwp/export/app_packager.cpp
@@ -30,6 +30,8 @@
#include "app_packager.h"
+#include "editor/editor_node.h"
+
String AppxPackager::hash_block(const uint8_t *p_block_data, size_t p_block_len) {
unsigned char hash[32];
char base64[45];
diff --git a/platform/uwp/export/app_packager.h b/platform/uwp/export/app_packager.h
index a5f5896592..da118449c7 100644
--- a/platform/uwp/export/app_packager.h
+++ b/platform/uwp/export/app_packager.h
@@ -41,7 +41,6 @@
#include "core/object/class_db.h"
#include "core/version.h"
#include "editor/editor_export.h"
-#include "editor/editor_node.h"
#include "thirdparty/minizip/unzip.h"
#include "thirdparty/minizip/zip.h"
diff --git a/platform/windows/export/export_plugin.cpp b/platform/windows/export/export_plugin.cpp
index d30d0afc5c..5ebc930735 100644
--- a/platform/windows/export/export_plugin.cpp
+++ b/platform/windows/export/export_plugin.cpp
@@ -30,6 +30,9 @@
#include "export_plugin.h"
+#include "core/config/project_settings.h"
+#include "editor/editor_node.h"
+
Error EditorExportPlatformWindows::sign_shared_object(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) {
if (p_preset->get("codesign/enable")) {
return _code_sign(p_preset, p_path);
diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h
index 89e5b1b635..86e9d49b05 100644
--- a/platform/windows/export/export_plugin.h
+++ b/platform/windows/export/export_plugin.h
@@ -34,7 +34,6 @@
#include "core/io/file_access.h"
#include "core/os/os.h"
#include "editor/editor_export.h"
-#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "platform/windows/logo.gen.h"
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index 28baa855b4..0a11416b1b 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -40,8 +40,6 @@
#include "drivers/winmidi/midi_driver_winmidi.h"
#include "key_mapping_windows.h"
#include "servers/audio_server.h"
-#include "servers/rendering/renderer_compositor.h"
-#include "servers/rendering_server.h"
#ifdef XAUDIO2_ENABLED
#include "drivers/xaudio2/audio_driver_xaudio2.h"
#endif
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index a761d0d1ec..f8e30c2462 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -33,6 +33,7 @@
#include "scene/2d/area_2d.h"
#include "scene/2d/audio_listener_2d.h"
#include "scene/main/window.h"
+#include "scene/resources/world_2d.h"
void AudioStreamPlayer2D::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index e8dfaf9c2e..548cd5de9a 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -30,6 +30,7 @@
#include "camera_2d.h"
+#include "core/config/project_settings.h"
#include "scene/main/window.h"
void Camera2D::_update_scroll() {
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index 70c7e48fd4..fbfe1d7eff 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -30,6 +30,7 @@
#include "collision_object_2d.h"
+#include "scene/resources/world_2d.h"
#include "scene/scene_string_names.h"
void CollisionObject2D::_notification(int p_what) {
diff --git a/scene/2d/navigation_agent_2d.cpp b/scene/2d/navigation_agent_2d.cpp
index 9331f2dccb..1bbf7236c5 100644
--- a/scene/2d/navigation_agent_2d.cpp
+++ b/scene/2d/navigation_agent_2d.cpp
@@ -31,6 +31,7 @@
#include "navigation_agent_2d.h"
#include "core/math/geometry_2d.h"
+#include "scene/resources/world_2d.h"
#include "servers/navigation_server_2d.h"
void NavigationAgent2D::_bind_methods() {
diff --git a/scene/2d/navigation_obstacle_2d.cpp b/scene/2d/navigation_obstacle_2d.cpp
index fad54070a5..90d993f20b 100644
--- a/scene/2d/navigation_obstacle_2d.cpp
+++ b/scene/2d/navigation_obstacle_2d.cpp
@@ -31,6 +31,7 @@
#include "navigation_obstacle_2d.h"
#include "scene/2d/collision_shape_2d.h"
+#include "scene/resources/world_2d.h"
#include "servers/navigation_server_2d.h"
void NavigationObstacle2D::_bind_methods() {
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp
index e685ad8f67..99d8b0f604 100644
--- a/scene/2d/navigation_region_2d.cpp
+++ b/scene/2d/navigation_region_2d.cpp
@@ -33,6 +33,7 @@
#include "core/core_string_names.h"
#include "core/math/geometry_2d.h"
#include "core/os/mutex.h"
+#include "scene/resources/world_2d.h"
#include "servers/navigation_server_2d.h"
#include "thirdparty/misc/polypartition.h"
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index 51b3e676f9..8b69d52c32 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -31,6 +31,7 @@
#include "ray_cast_2d.h"
#include "collision_object_2d.h"
+#include "scene/resources/world_2d.h"
void RayCast2D::set_target_position(const Vector2 &p_point) {
target_position = p_point;
diff --git a/scene/2d/shape_cast_2d.h b/scene/2d/shape_cast_2d.h
index ea36b25068..15436d6e3d 100644
--- a/scene/2d/shape_cast_2d.h
+++ b/scene/2d/shape_cast_2d.h
@@ -33,6 +33,7 @@
#include "scene/2d/node_2d.h"
#include "scene/resources/shape_2d.h"
+#include "scene/resources/world_2d.h"
class CollisionObject2D;
diff --git a/scene/2d/skeleton_2d.cpp b/scene/2d/skeleton_2d.cpp
index 2270926ea7..a12147b7fd 100644
--- a/scene/2d/skeleton_2d.cpp
+++ b/scene/2d/skeleton_2d.cpp
@@ -31,6 +31,7 @@
#include "skeleton_2d.h"
#ifdef TOOLS_ENABLED
+#include "editor/editor_data.h"
#include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#endif //TOOLS_ENABLED
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 02ca1ba2aa..cd39e08682 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -31,7 +31,7 @@
#include "tile_map.h"
#include "core/io/marshalls.h"
-
+#include "scene/resources/world_2d.h"
#include "servers/navigation_server_2d.h"
Map<Vector2i, TileSet::CellNeighbor> TileMap::TerrainConstraint::get_overlapping_coords_and_peering_bits() const {
diff --git a/scene/3d/camera_3d.h b/scene/3d/camera_3d.h
index b5665814c7..9f2f8ceed1 100644
--- a/scene/3d/camera_3d.h
+++ b/scene/3d/camera_3d.h
@@ -33,6 +33,8 @@
#include "scene/3d/node_3d.h"
#include "scene/3d/velocity_tracker_3d.h"
+#include "scene/resources/camera_effects.h"
+#include "scene/resources/environment.h"
class Camera3D : public Node3D {
GDCLASS(Camera3D, Node3D);
diff --git a/scene/3d/node_3d.h b/scene/3d/node_3d.h
index 4abda66187..65d0e071cf 100644
--- a/scene/3d/node_3d.h
+++ b/scene/3d/node_3d.h
@@ -32,6 +32,7 @@
#define NODE_3D_H
#include "scene/main/node.h"
+#include "scene/resources/world_3d.h"
class Node3DGizmo : public RefCounted {
GDCLASS(Node3DGizmo, RefCounted);
diff --git a/scene/3d/occluder_instance_3d.cpp b/scene/3d/occluder_instance_3d.cpp
index 0277171922..231817526c 100644
--- a/scene/3d/occluder_instance_3d.cpp
+++ b/scene/3d/occluder_instance_3d.cpp
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "occluder_instance_3d.h"
+
+#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "core/math/geometry_2d.h"
#include "core/math/triangulate.h"
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp
index 66d1b97056..211c39c949 100644
--- a/scene/3d/xr_nodes.cpp
+++ b/scene/3d/xr_nodes.cpp
@@ -30,6 +30,7 @@
#include "xr_nodes.h"
+#include "core/config/project_settings.h"
#include "scene/main/viewport.h"
#include "servers/xr/xr_interface.h"
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index 0bcad4fc0e..6bfffe7575 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -31,6 +31,7 @@
#ifndef BASE_BUTTON_H
#define BASE_BUTTON_H
+#include "core/input/shortcut.h"
#include "scene/gui/control.h"
class ButtonGroup;
diff --git a/scene/gui/control.h b/scene/gui/control.h
index 7024164e6c..becb50a118 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -31,12 +31,10 @@
#ifndef CONTROL_H
#define CONTROL_H
-#include "core/input/shortcut.h"
#include "core/math/transform_2d.h"
#include "core/object/gdvirtual.gen.inc"
#include "core/templates/rid.h"
#include "scene/main/canvas_item.h"
-#include "scene/main/node.h"
#include "scene/main/timer.h"
#include "scene/resources/theme.h"
diff --git a/scene/gui/flow_container.cpp b/scene/gui/flow_container.cpp
index ba487b2905..e806a4a8a6 100644
--- a/scene/gui/flow_container.cpp
+++ b/scene/gui/flow_container.cpp
@@ -28,8 +28,6 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "scene/gui/container.h"
-
#include "flow_container.h"
struct _LineData {
diff --git a/scene/gui/flow_container.h b/scene/gui/flow_container.h
index 84f2ae4ae3..a2da43e071 100644
--- a/scene/gui/flow_container.h
+++ b/scene/gui/flow_container.h
@@ -31,7 +31,7 @@
#ifndef FLOW_CONTAINER_H
#define FLOW_CONTAINER_H
-class Container;
+#include "scene/gui/container.h"
class FlowContainer : public Container {
GDCLASS(FlowContainer, Container);
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index da973b46f0..b0d1944d6e 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -36,9 +36,7 @@
#include "scene/gui/graph_node.h"
#include "scene/gui/label.h"
#include "scene/gui/scroll_bar.h"
-#include "scene/gui/slider.h"
#include "scene/gui/spin_box.h"
-#include "scene/gui/texture_rect.h"
class GraphEdit;
class ViewPanner;
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index 7d302e967d..a455e866b1 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -32,7 +32,6 @@
#define LINKBUTTON_H
#include "scene/gui/base_button.h"
-#include "scene/resources/bit_map.h"
#include "scene/resources/text_line.h"
class LinkButton : public BaseButton {
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 61a5fb999c..5c86e1850e 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -30,6 +30,7 @@
#include "popup_menu.h"
+#include "core/config/project_settings.h"
#include "core/input/input.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 5e128d594c..7e69fa09e7 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "scroll_container.h"
+
+#include "core/config/project_settings.h"
#include "core/os/os.h"
#include "scene/main/window.h"
diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h
index a368a10ad0..2a9e7bac3d 100644
--- a/scene/main/canvas_item.h
+++ b/scene/main/canvas_item.h
@@ -32,10 +32,8 @@
#define CANVAS_ITEM_H
#include "scene/main/node.h"
-#include "scene/main/scene_tree.h"
#include "scene/resources/canvas_item_material.h"
#include "scene/resources/font.h"
-#include "servers/text_server.h"
class CanvasLayer;
class MultiMesh;
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 3f3e72357b..d4418a3cde 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -29,8 +29,10 @@
/*************************************************************************/
#include "canvas_layer.h"
-#include "canvas_item.h"
-#include "viewport.h"
+
+#include "scene/main/canvas_item.h"
+#include "scene/main/viewport.h"
+#include "scene/resources/world_2d.h"
void CanvasLayer::set_layer(int p_xform) {
layer = p_xform;
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index d5bc7d111a..05086541a5 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -30,6 +30,7 @@
#include "node.h"
+#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "core/io/resource_loader.h"
#include "core/multiplayer/multiplayer_api.h"
diff --git a/scene/main/node.h b/scene/main/node.h
index 0ac10f4381..f2dcdf4b43 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -31,9 +31,6 @@
#ifndef NODE_H
#define NODE_H
-#include "core/config/project_settings.h"
-#include "core/object/class_db.h"
-#include "core/object/script_language.h"
#include "core/string/node_path.h"
#include "core/templates/map.h"
#include "core/variant/typed_array.h"
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 69d781cbfc..f02032a6c9 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -44,10 +44,13 @@
#include "node.h"
#include "scene/animation/tween.h"
#include "scene/debugger/scene_debugger.h"
+#include "scene/main/viewport.h"
#include "scene/resources/font.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/packed_scene.h"
+#include "scene/resources/world_2d.h"
+#include "scene/resources/world_3d.h"
#include "scene/scene_string_names.h"
#include "servers/display_server.h"
#include "servers/navigation_server_3d.h"
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index a5cd52b4ca..5f7c1729e8 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -35,8 +35,6 @@
#include "core/os/thread_safe.h"
#include "core/templates/self_list.h"
#include "scene/resources/mesh.h"
-#include "scene/resources/world_2d.h"
-#include "scene/resources/world_3d.h"
#undef Window
@@ -48,6 +46,7 @@ class Mesh;
class MultiplayerAPI;
class SceneDebugger;
class Tween;
+class Viewport;
class SceneTreeTimer : public RefCounted {
GDCLASS(SceneTreeTimer, RefCounted);
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 522997cdf5..a1ff95ea9a 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -30,6 +30,7 @@
#include "viewport.h"
+#include "core/config/project_settings.h"
#include "core/core_string_names.h"
#include "core/debugger/engine_debugger.h"
#include "core/object/message_queue.h"
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index f2ebe50fa3..b5e0e7b110 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -30,6 +30,7 @@
#include "window.h"
+#include "core/config/project_settings.h"
#include "core/debugger/engine_debugger.h"
#include "core/string/translation.h"
#include "scene/gui/control.h"
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index dd1e664ca6..b71fe8904a 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -34,7 +34,6 @@
#include "core/io/resource.h"
#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
-#include "servers/rendering_server.h"
class Environment : public Resource {
GDCLASS(Environment, Resource);
diff --git a/scene/resources/skeleton_modification_2d_jiggle.cpp b/scene/resources/skeleton_modification_2d_jiggle.cpp
index eee6067dae..0921417656 100644
--- a/scene/resources/skeleton_modification_2d_jiggle.cpp
+++ b/scene/resources/skeleton_modification_2d_jiggle.cpp
@@ -29,7 +29,9 @@
/*************************************************************************/
#include "skeleton_modification_2d_jiggle.h"
+
#include "scene/2d/skeleton_2d.h"
+#include "scene/resources/world_2d.h"
bool SkeletonModification2DJiggle::_set(const StringName &p_path, const Variant &p_value) {
String path = p_path;
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index 901ff22252..373fbb94ea 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "theme.h"
+
#include "core/string/print_string.h"
// Universal Theme resources used when no other theme has the item.
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index 7a61ccf8af..9afe05007d 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -32,7 +32,6 @@
#define THEME_H
#include "core/io/resource.h"
-#include "core/io/resource_loader.h"
#include "scene/resources/font.h"
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h
index 91f9a026d3..4a277c3d84 100644
--- a/scene/resources/world_2d.h
+++ b/scene/resources/world_2d.h
@@ -31,8 +31,8 @@
#ifndef WORLD_2D_H
#define WORLD_2D_H
-#include "core/config/project_settings.h"
#include "core/io/resource.h"
+#include "scene/resources/world_2d.h"
#include "servers/physics_server_2d.h"
class VisibleOnScreenNotifier2D;
diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp
index c012ab6177..0088236112 100644
--- a/scene/resources/world_3d.cpp
+++ b/scene/resources/world_3d.cpp
@@ -30,7 +30,7 @@
#include "world_3d.h"
-#include "core/math/camera_matrix.h"
+#include "core/config/project_settings.h"
#include "core/math/octree.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/visible_on_screen_notifier_3d.h"
diff --git a/servers/rendering/rasterizer_dummy.h b/servers/rendering/rasterizer_dummy.h
index 7d5a596c50..be374f1a21 100644
--- a/servers/rendering/rasterizer_dummy.h
+++ b/servers/rendering/rasterizer_dummy.h
@@ -31,7 +31,6 @@
#ifndef RASTERIZER_DUMMY_H
#define RASTERIZER_DUMMY_H
-#include "core/math/camera_matrix.h"
#include "core/templates/rid_owner.h"
#include "core/templates/self_list.h"
#include "scene/resources/mesh.h"
diff --git a/servers/rendering/renderer_compositor.h b/servers/rendering/renderer_compositor.h
index f245af9a4a..e58fd7bebc 100644
--- a/servers/rendering/renderer_compositor.h
+++ b/servers/rendering/renderer_compositor.h
@@ -31,13 +31,11 @@
#ifndef RENDERING_SERVER_COMPOSITOR_H
#define RENDERING_SERVER_COMPOSITOR_H
-#include "core/math/camera_matrix.h"
-#include "core/templates/pair.h"
-#include "core/templates/self_list.h"
#include "servers/rendering/renderer_canvas_render.h"
#include "servers/rendering/renderer_scene.h"
#include "servers/rendering/renderer_storage.h"
#include "servers/rendering_server.h"
+
class RendererSceneRender;
struct BlitToScreen {
RID render_target;
diff --git a/servers/rendering/renderer_scene.h b/servers/rendering/renderer_scene.h
index 4c58fce1c9..43d5b07869 100644
--- a/servers/rendering/renderer_scene.h
+++ b/servers/rendering/renderer_scene.h
@@ -31,7 +31,7 @@
#ifndef RENDERINGSERVERSCENE_H
#define RENDERINGSERVERSCENE_H
-#include "servers/rendering/renderer_compositor.h"
+#include "servers/rendering_server.h"
#include "servers/xr/xr_interface.h"
class RendererScene {
diff --git a/servers/rendering/renderer_scene_cull.h b/servers/rendering/renderer_scene_cull.h
index ed0229f0f9..90d290bef9 100644
--- a/servers/rendering/renderer_scene_cull.h
+++ b/servers/rendering/renderer_scene_cull.h
@@ -31,23 +31,18 @@
#ifndef RENDERING_SERVER_SCENE_CULL_H
#define RENDERING_SERVER_SCENE_CULL_H
-#include "core/templates/bin_sorted_array.h"
-#include "core/templates/pass_func.h"
-#include "servers/rendering/renderer_compositor.h"
-
#include "core/math/dynamic_bvh.h"
-#include "core/math/geometry_3d.h"
-#include "core/math/octree.h"
-#include "core/os/semaphore.h"
-#include "core/os/thread.h"
+#include "core/templates/bin_sorted_array.h"
#include "core/templates/local_vector.h"
#include "core/templates/paged_allocator.h"
#include "core/templates/paged_array.h"
+#include "core/templates/pass_func.h"
#include "core/templates/rid_owner.h"
#include "core/templates/self_list.h"
#include "servers/rendering/renderer_scene.h"
#include "servers/rendering/renderer_scene_occlusion_cull.h"
#include "servers/rendering/renderer_scene_render.h"
+#include "servers/rendering/renderer_storage.h"
#include "servers/xr/xr_interface.h"
class RendererSceneCull : public RendererScene {
diff --git a/servers/rendering/renderer_scene_render.h b/servers/rendering/renderer_scene_render.h
index cedf6575fd..5f9c4bb816 100644
--- a/servers/rendering/renderer_scene_render.h
+++ b/servers/rendering/renderer_scene_render.h
@@ -34,7 +34,6 @@
#include "core/math/camera_matrix.h"
#include "core/templates/paged_array.h"
#include "servers/rendering/renderer_scene.h"
-#include "servers/rendering/renderer_storage.h"
class RendererSceneRender {
public:
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index 504b83c2b0..34c87d64b7 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -91,6 +91,11 @@
#include "tests/test_macros.h"
#include "scene/resources/default_theme/default_theme.h"
+#include "servers/navigation_server_2d.h"
+#include "servers/navigation_server_3d.h"
+#include "servers/physics_server_2d.h"
+#include "servers/physics_server_3d.h"
+#include "servers/rendering/rendering_server_default.h"
int test_main(int argc, char *argv[]) {
bool run_tests = true;
@@ -156,10 +161,6 @@ int test_main(int argc, char *argv[]) {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-#include "servers/navigation_server_2d.h"
-#include "servers/navigation_server_3d.h"
-#include "servers/rendering/rendering_server_default.h"
-
struct GodotTestCaseListener : public doctest::IReporter {
GodotTestCaseListener(const doctest::ContextOptions &p_in) {}