diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index a2a1b69fd..2bb168917 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -36,6 +36,8 @@ #include "editor_scale.h" #include "scene/gui/margin_container.h" +#include "core/project_settings.h" + void DependencyEditor::_searched(const String &p_path) { Map dep_rename; dep_rename[replacing] = p_path; diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 3b8b3d92d..c9401cb13 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -39,6 +39,8 @@ #include "scene/resources/font.h" #include "servers/audio_server.h" +#include "core/project_settings.h" + void EditorAudioBus::_update_visible_channels() { int i = 0; for (; i < cc; i++) { diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index ef1acd0ae..8f613e2dc 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -44,6 +44,9 @@ #include "scene/gui/margin_container.h" #include "scene/gui/popup_menu.h" #include "scene/gui/scroll_bar.h" +#include "scene/resources/world.h" + +#include "core/project_settings.h" EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func = nullptr; EditorFileDialog::GetIconFunc EditorFileDialog::get_large_icon_func = nullptr; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b724494ed..a5c19666a 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -159,6 +159,8 @@ #include "editor/run_settings_dialog.h" #include "editor/script_editor_debugger.h" #include "editor/settings_config_dialog.h" +#include "scene/resources/environment.h" +#include "scene/resources/world.h" #include #include diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index b8b11303d..2b3c724bc 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -36,6 +36,7 @@ #include "editor_properties_array_dict.h" #include "editor_scale.h" #include "scene/main/viewport.h" +#include "core/project_settings.h" ///////////////////// NULL ///////////////////////// diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 0c594f878..64a688239 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -43,6 +43,7 @@ #include "scene/gui/line_edit.h" #include "scene/gui/progress_bar.h" #include "scene/gui/tree.h" +#include "core/project_settings.h" const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found"; const char *FindInFiles::SIGNAL_FINISHED = "finished"; diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 341510ba9..bc88e8d30 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -37,6 +37,7 @@ #include "editor/editor_file_system.h" #include "editor/editor_node.h" #include "scene/resources/texture.h" +#include "core/project_settings.h" String ResourceImporterLayeredTexture::get_importer_name() const { return is_3d ? "texture_3d" : "texture_array"; diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index cf1ec5b2e..b82a3b973 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -35,6 +35,7 @@ #include "editor/editor_file_system.h" #include "editor/editor_node.h" #include "scene/resources/texture.h" +#include "core/project_settings.h" void ResourceImporterTexture::_texture_reimport_srgb(const Ref &p_tex) { singleton->mutex.lock(); diff --git a/editor/import_defaults_editor.cpp b/editor/import_defaults_editor.cpp index 3ae50343a..cf5a4b6b6 100644 --- a/editor/import_defaults_editor.cpp +++ b/editor/import_defaults_editor.cpp @@ -30,6 +30,8 @@ #include "import_defaults_editor.h" +#include "core/project_settings.h" + class ImportDefaultsEditorSettings : public Object { GDCLASS(ImportDefaultsEditorSettings, Object) friend class ImportDefaultsEditor; diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp index 6afd117da..dadd599eb 100644 --- a/editor/import_dock.cpp +++ b/editor/import_dock.cpp @@ -32,6 +32,7 @@ #include "editor_node.h" #include "editor_resource_preview.h" #include "editor_scale.h" +#include "core/project_settings.h" class ImportDockParameters : public Object { GDCLASS(ImportDockParameters, Object); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index bce0607d5..db185824f 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -42,6 +42,8 @@ #include "scene/resources/mesh.h" #include "servers/audio/audio_stream.h" +#include "core/project_settings.h" + void post_process_preview(Ref p_image) { if (p_image->get_format() != Image::FORMAT_RGBA8) { p_image->convert(Image::FORMAT_RGBA8); diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index 6e5ce7346..ed000d8bb 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -35,6 +35,9 @@ #include "scene/resources/particles_material.h" #include "scene/main/viewport.h" #include "scene/gui/texture_button.h" +#include "scene/resources/sky.h" +#include "scene/resources/environment.h" +#include "scene/resources/world.h" void MaterialEditor::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp index 656f84917..86a5abf99 100644 --- a/editor/plugins/mesh_editor_plugin.cpp +++ b/editor/plugins/mesh_editor_plugin.cpp @@ -33,6 +33,7 @@ #include "editor/editor_scale.h" #include "scene/main/viewport.h" #include "scene/gui/texture_button.h" +#include "scene/resources/world.h" void MeshEditor::_gui_input(Ref p_event) { Ref mm = p_event; diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index 0c34ecb3c..2d1212132 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "editor/plugins/spatial_editor_plugin.h" #include "scene/3d/cpu_particles.h" #include "scene/resources/particles_material.h" +#include "scene/resources/world.h" bool ParticlesEditorBase::_generate(PoolVector &points, PoolVector &normals) { bool use_normals = emission_fill->get_selected() == 1; diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp index f105b2ec3..bbeece0d4 100644 --- a/editor/plugins/path_2d_editor_plugin.cpp +++ b/editor/plugins/path_2d_editor_plugin.cpp @@ -35,6 +35,7 @@ #include "core/os/keyboard.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" +#include "scene/resources/world.h" void Path2DEditor::_notification(int p_what) { switch (p_what) { diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp index c6eb3cdd8..d11acab0a 100644 --- a/editor/plugins/path_editor_plugin.cpp +++ b/editor/plugins/path_editor_plugin.cpp @@ -33,6 +33,7 @@ #include "core/os/keyboard.h" #include "scene/resources/curve.h" #include "spatial_editor_plugin.h" +#include "scene/resources/world.h" String PathSpatialGizmo::get_handle_name(int p_idx) const { Ref c = path->get_curve(); diff --git a/editor/plugins/physical_bone_plugin.cpp b/editor/plugins/physical_bone_plugin.cpp index 87b4a95e4..e2814da7b 100644 --- a/editor/plugins/physical_bone_plugin.cpp +++ b/editor/plugins/physical_bone_plugin.cpp @@ -31,6 +31,7 @@ #include "physical_bone_plugin.h" #include "editor/plugins/spatial_editor_plugin.h" #include "scene/3d/physics_body.h" +#include "scene/resources/world.h" void PhysicalBoneEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_on_toggle_button_transform_joint", "is_pressed"), &PhysicalBoneEditor::_on_toggle_button_transform_joint); diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp index 5ec55fb1f..abc3f5fec 100644 --- a/editor/plugins/polygon_2d_editor_plugin.cpp +++ b/editor/plugins/polygon_2d_editor_plugin.cpp @@ -38,6 +38,7 @@ #include "editor/editor_settings.h" #include "scene/2d/skeleton_2d.h" #include "scene/gui/panel.h" +#include "scene/resources/world.h" Node2D *Polygon2DEditor::_get_node() const { return node; diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index 102a42be6..19be7a9a9 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "core/project_settings.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" +#include "scene/resources/world.h" void ResourcePreloaderEditor::_gui_input(Ref p_event) { } diff --git a/editor/plugins/room_manager_editor_plugin.cpp b/editor/plugins/room_manager_editor_plugin.cpp index b31f9473e..8a53872e0 100644 --- a/editor/plugins/room_manager_editor_plugin.cpp +++ b/editor/plugins/room_manager_editor_plugin.cpp @@ -32,6 +32,7 @@ #include "editor/spatial_editor_gizmos.h" #include "scene/resources/occluder_shape.h" +#include "scene/resources/world.h" void RoomManagerEditorPlugin::_flip_portals() { if (_room_manager) { diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 63fb516c4..b4e751123 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -37,6 +37,7 @@ #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/script_editor_debugger.h" +#include "core/project_settings.h" void ConnectionInfoDialog::ok_pressed() { } diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp index fb735665f..85ba12d28 100644 --- a/editor/plugins/skeleton_2d_editor_plugin.cpp +++ b/editor/plugins/skeleton_2d_editor_plugin.cpp @@ -34,6 +34,7 @@ #include "scene/2d/mesh_instance_2d.h" #include "scene/gui/box_container.h" #include "thirdparty/misc/clipper.hpp" +#include "scene/resources/world.h" void Skeleton2DEditor::_node_removed(Node *p_node) { if (p_node == node) { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 3b2ade5d2..3734b4087 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -52,9 +52,11 @@ #include "scene/3d/visual_instance.h" #include "scene/gui/viewport_container.h" #include "scene/main/viewport.h" +#include "scene/resources/environment.h" #include "scene/resources/packed_scene.h" #include "scene/resources/skin.h" #include "scene/resources/surface_tool.h" +#include "scene/resources/world.h" #define DISTANCE_DEFAULT 4 @@ -4975,6 +4977,10 @@ void SpatialEditor::set_state(const Dictionary &p_state) { } } +Ref SpatialEditor::get_viewport_environment() { + return viewport_environment; +} + void SpatialEditor::edit(Spatial *p_spatial) { if (p_spatial != selected) { if (selected) { diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h index 39131069c..b9463b669 100644 --- a/editor/plugins/spatial_editor_plugin.h +++ b/editor/plugins/spatial_editor_plugin.h @@ -39,12 +39,14 @@ #include "scene/3d/visual_instance.h" #include "scene/gui/panel_container.h" #include "scene/3d/skeleton.h" +#include "core/reference.h" class Camera; class SpatialEditor; class EditorSpatialGizmoPlugin; class ViewportContainer; class SpatialEditorViewport; +class Environment; class EditorSpatialGizmo : public SpatialGizmo { GDCLASS(EditorSpatialGizmo, SpatialGizmo); @@ -823,7 +825,7 @@ public: Dictionary get_state() const; void set_state(const Dictionary &p_state); - Ref get_viewport_environment() { return viewport_environment; } + Ref get_viewport_environment(); UndoRedo *get_undo_redo() { return undo_redo; } diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index dfb0d330c..40e67e8d5 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -40,6 +40,7 @@ #include "scene/gui/center_container.h" #include "scene/gui/margin_container.h" #include "scene/gui/panel_container.h" +#include "scene/resources/world.h" void SpriteFramesEditor::_gui_input(Ref p_event) { } diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp index a69e524b3..bd4987a84 100644 --- a/editor/plugins/theme_editor_preview.cpp +++ b/editor/plugins/theme_editor_preview.cpp @@ -33,6 +33,7 @@ #include "core/math/math_funcs.h" #include "core/os/input.h" #include "scene/resources/packed_scene.h" +#include "core/project_settings.h" #include "editor/editor_scale.h" diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 04cd6dfd6..53f4040f1 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -55,6 +55,9 @@ #include "scene/gui/texture_button.h" #include "scene/gui/panel.h" #include "scene/gui/option_button.h" +#include "core/project_settings.h" +#include "servers/physics_2d_server.h" +#include "servers/physics_server.h" static inline String get_project_key_from_path(const String &dir) { return dir.replace("/", "::"); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index f39c4f94c..a5735f0f0 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -40,6 +40,7 @@ #include "editor/editor_scale.h" #include "scene/gui/margin_container.h" #include "scene/gui/tab_container.h" +#include "core/project_settings.h" ProjectSettingsEditor *ProjectSettingsEditor::singleton = nullptr; diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index c461f7db7..b56fce4bd 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -70,6 +70,8 @@ #include "scene/main/viewport.h" #include "scene/resources/skin.h" #include "scene/3d/skeleton.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" #define HANDLE_HALF_SIZE 9.5 diff --git a/modules/entity_spell_system/singletons/ess.cpp b/modules/entity_spell_system/singletons/ess.cpp index 11e4bd742..608dd4217 100644 --- a/modules/entity_spell_system/singletons/ess.cpp +++ b/modules/entity_spell_system/singletons/ess.cpp @@ -26,6 +26,7 @@ SOFTWARE. #include "../material_cache/ess_material_cache.h" #include "../spawners/ess_entity_spawner.h" #include "../utility/entity_create_info.h" +#include "core/project_settings.h" ESS *ESS::instance; diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 4ffca4978..5d6ac95d0 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -34,6 +34,7 @@ #include "core/global_constants.h" #include "core/os/file_access.h" #include "gdscript_compiler.h" +#include "core/project_settings.h" #ifdef TOOLS_ENABLED #include "editor/editor_file_system.h" diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 5eeb3d5e6..3a19253f0 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -51,6 +51,7 @@ #include "scene/resources/multimesh.h" #include "scene/resources/mesh.h" #include "scene/resources/navigation_mesh.h" +#include "scene/resources/shape.h" #include "modules/modules_enabled.gen.h" // For csg, gridmap. diff --git a/modules/props/prop_instance_merger.cpp b/modules/props/prop_instance_merger.cpp index 14a2d43f0..833334443 100644 --- a/modules/props/prop_instance_merger.cpp +++ b/modules/props/prop_instance_merger.cpp @@ -5,6 +5,8 @@ //#include "../thread_pool/thread_pool.h" #include "core/version.h" +#include "servers/visual_server.h" +#include "scene/resources/world.h" #if VERSION_MAJOR > 3 #include "core/config/engine.h" diff --git a/modules/props/prop_instance_prop_job.cpp b/modules/props/prop_instance_prop_job.cpp index bd4ed00da..b32459efe 100644 --- a/modules/props/prop_instance_prop_job.cpp +++ b/modules/props/prop_instance_prop_job.cpp @@ -38,6 +38,8 @@ SOFTWARE. #include "prop_mesher.h" #include "scene/resources/shape.h" #include "singleton/prop_cache.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" #ifdef MESH_DATA_RESOURCE_PRESENT #include "../mesh_data_resource/mesh_data_resource.h" diff --git a/modules/props/tiled_wall/tiled_wall.cpp b/modules/props/tiled_wall/tiled_wall.cpp index b1488eedc..b3bc5cd7b 100644 --- a/modules/props/tiled_wall/tiled_wall.cpp +++ b/modules/props/tiled_wall/tiled_wall.cpp @@ -24,6 +24,8 @@ #include "core/core_string_names.h" #include "tiled_wall_data.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" int TiledWall::get_width() const { return _width; diff --git a/modules/props_2d/prop_2d_instance_merger.cpp b/modules/props_2d/prop_2d_instance_merger.cpp index d05098df5..5d2d8655b 100644 --- a/modules/props_2d/prop_2d_instance_merger.cpp +++ b/modules/props_2d/prop_2d_instance_merger.cpp @@ -3,7 +3,8 @@ #include "../mesh_data_resource/nodes/mesh_data_instance.h" //#include "../thread_pool/thread_pool.h" - +#include "servers/physics_server.h" +#include "scene/resources/world_2d.h" #include "core/version.h" #if VERSION_MAJOR > 3 diff --git a/modules/rtile_map/tile_map.cpp b/modules/rtile_map/tile_map.cpp index 6c4f5a5c7..516aab3c8 100644 --- a/modules/rtile_map/tile_map.cpp +++ b/modules/rtile_map/tile_map.cpp @@ -36,6 +36,7 @@ #include "scene/2d/area_2d.h" #include "scene/2d/collision_object_2d.h" #include "servers/physics_2d_server.h" +#include "scene/resources/world_2d.h" #if VERSION_MINOR >= 5 #include "servers/navigation_2d_server.h" diff --git a/modules/terraman/world/default/terrain_chunk_default.cpp b/modules/terraman/world/default/terrain_chunk_default.cpp index ae6554219..913f540d5 100644 --- a/modules/terraman/world/default/terrain_chunk_default.cpp +++ b/modules/terraman/world/default/terrain_chunk_default.cpp @@ -38,6 +38,7 @@ SOFTWARE. #include "../jobs/terrain_light_job.h" #include "../jobs/terrain_prop_job.h" #include "../jobs/terrain_terrain_job.h" +#include "scene/resources/world.h" const String TerrainChunkDefault::BINDING_STRING_BUILD_FLAGS = "Use Isolevel,Use Lighting,Use AO,Use RAO,Generate AO,Generate RAO,Bake Lights,Create Collider,Create Lods"; diff --git a/modules/terraman/world/default/terrain_world_default.cpp b/modules/terraman/world/default/terrain_world_default.cpp index 41be6b9e4..fc6bb162e 100644 --- a/modules/terraman/world/default/terrain_world_default.cpp +++ b/modules/terraman/world/default/terrain_world_default.cpp @@ -30,6 +30,7 @@ SOFTWARE. #include "../jobs/terrain_light_job.h" #include "../jobs/terrain_prop_job.h" #include "../jobs/terrain_terrain_job.h" +#include "servers/physics_server.h" _FORCE_INLINE_ int TerrainWorldDefault::get_build_flags() const { return _build_flags; diff --git a/modules/terraman/world/jobs/terrain_prop_job.cpp b/modules/terraman/world/jobs/terrain_prop_job.cpp index 19a8bd898..2351a8ab6 100644 --- a/modules/terraman/world/jobs/terrain_prop_job.cpp +++ b/modules/terraman/world/jobs/terrain_prop_job.cpp @@ -31,6 +31,8 @@ SOFTWARE. #include "../../meshers/default/terrain_mesher_default.h" #include "../../meshers/terrain_mesher.h" #include "../default/terrain_chunk_default.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" #ifdef MESH_DATA_RESOURCE_PRESENT #include "../../../mesh_data_resource/mesh_data_resource.h" diff --git a/modules/terraman/world/jobs/terrain_terrain_job.cpp b/modules/terraman/world/jobs/terrain_terrain_job.cpp index a88e6e9ef..b7c2e12cd 100644 --- a/modules/terraman/world/jobs/terrain_terrain_job.cpp +++ b/modules/terraman/world/jobs/terrain_terrain_job.cpp @@ -30,6 +30,7 @@ SOFTWARE. #include "../../meshers/terrain_mesher.h" #include "../default/terrain_chunk_default.h" +#include "servers/physics_server.h" #ifdef MESH_UTILS_PRESENT #include "../../../mesh_utils/fast_quadratic_mesh_simplifier.h" diff --git a/modules/terraman/world/terrain_chunk.cpp b/modules/terraman/world/terrain_chunk.cpp index 81d27c88b..912c41a87 100644 --- a/modules/terraman/world/terrain_chunk.cpp +++ b/modules/terraman/world/terrain_chunk.cpp @@ -31,6 +31,7 @@ SOFTWARE. #include "core/message_queue.h" #include "jobs/terrain_job.h" #include "terrain_structure.h" +#include "servers/physics_server.h" #if THREAD_POOL_PRESENT #include "../../thread_pool/thread_pool.h" diff --git a/modules/terraman/world/terrain_environment_data.cpp b/modules/terraman/world/terrain_environment_data.cpp index 4c19ad157..711605806 100644 --- a/modules/terraman/world/terrain_environment_data.cpp +++ b/modules/terraman/world/terrain_environment_data.cpp @@ -22,6 +22,8 @@ SOFTWARE. #include "terrain_environment_data.h" +#include "scene/resources/environment.h" + Ref TerrainEnvironmentData::get_environment() { return _environment; } diff --git a/modules/terraman/world/terrain_world_editor.cpp b/modules/terraman/world/terrain_world_editor.cpp index e287a7397..6e485737d 100644 --- a/modules/terraman/world/terrain_world_editor.cpp +++ b/modules/terraman/world/terrain_world_editor.cpp @@ -35,6 +35,8 @@ SOFTWARE. #include "../library/terrain_surface.h" #include "../library/terrain_library.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" #include "../defines.h" diff --git a/modules/terraman_2d/meshers/default/terrain_2d_mesher_default.cpp b/modules/terraman_2d/meshers/default/terrain_2d_mesher_default.cpp index 617c6d420..65554ff98 100644 --- a/modules/terraman_2d/meshers/default/terrain_2d_mesher_default.cpp +++ b/modules/terraman_2d/meshers/default/terrain_2d_mesher_default.cpp @@ -30,6 +30,9 @@ SOFTWARE. #include visual_server_h #include mesh_instance_h +#include "servers/physics_2d_server.h" +#include "scene/resources/world_2d.h" + _FORCE_INLINE_ int Terrain2DMesherDefault::get_build_flags() const { return _build_flags; } diff --git a/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp b/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp index b74b352f5..bcd73fbd8 100644 --- a/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp +++ b/modules/terraman_2d/world/default/terrain_2d_chunk_default.cpp @@ -39,6 +39,8 @@ SOFTWARE. #include "../jobs/terrain_2d_prop_job.h" #include "../jobs/terrain_2d_terrain_job.h" #include "servers/physics_2d_server.h" +#include "scene/resources/world.h" +#include "scene/resources/world_2d.h" const String Terrain2DChunkDefault::BINDING_STRING_BUILD_FLAGS = "Use Lighting,Use AO,Use RAO,Generate AO,Generate RAO,Bake Lights,Create Collider"; diff --git a/modules/terraman_2d/world/jobs/terrain_2d_terrain_job.cpp b/modules/terraman_2d/world/jobs/terrain_2d_terrain_job.cpp index 6553077be..351339202 100644 --- a/modules/terraman_2d/world/jobs/terrain_2d_terrain_job.cpp +++ b/modules/terraman_2d/world/jobs/terrain_2d_terrain_job.cpp @@ -30,6 +30,7 @@ SOFTWARE. #include "../../meshers/terrain_2d_mesher.h" #include "../default/terrain_2d_chunk_default.h" +#include "servers/physics_2d_server.h" #ifdef MESH_UTILS_PRESENT #include "../../../mesh_utils/fast_quadratic_mesh_simplifier.h" diff --git a/modules/terraman_2d/world/terrain_2d_environment_data.cpp b/modules/terraman_2d/world/terrain_2d_environment_data.cpp index 8cac301a3..00514f1d1 100644 --- a/modules/terraman_2d/world/terrain_2d_environment_data.cpp +++ b/modules/terraman_2d/world/terrain_2d_environment_data.cpp @@ -22,6 +22,8 @@ SOFTWARE. #include "terrain_2d_environment_data.h" +#include "scene/resources/environment.h" + Ref Terrain2DEnvironmentData::get_environment() { return _environment; } diff --git a/modules/voxelman/world/default/voxel_chunk_default.cpp b/modules/voxelman/world/default/voxel_chunk_default.cpp index d5d8f8c1b..9e9e032e1 100644 --- a/modules/voxelman/world/default/voxel_chunk_default.cpp +++ b/modules/voxelman/world/default/voxel_chunk_default.cpp @@ -38,6 +38,7 @@ SOFTWARE. #include "../jobs/voxel_light_job.h" #include "../jobs/voxel_prop_job.h" #include "../jobs/voxel_terrain_job.h" +#include "scene/resources/world.h" const String VoxelChunkDefault::BINDING_STRING_BUILD_FLAGS = "Use Isolevel,Use Lighting,Use AO,Use RAO,Generate AO,Generate RAO,Bake Lights,Create Collider,Create Lods"; diff --git a/modules/voxelman/world/environment_data.cpp b/modules/voxelman/world/environment_data.cpp index aff06b77f..4deea59f6 100644 --- a/modules/voxelman/world/environment_data.cpp +++ b/modules/voxelman/world/environment_data.cpp @@ -22,6 +22,8 @@ SOFTWARE. #include "environment_data.h" +#include "scene/resources/environment.h" + Ref EnvironmentData::get_environment() { return _environment; } diff --git a/modules/voxelman/world/environment_data.h b/modules/voxelman/world/environment_data.h index 4799243bd..4ca6e0b09 100644 --- a/modules/voxelman/world/environment_data.h +++ b/modules/voxelman/world/environment_data.h @@ -37,9 +37,13 @@ SOFTWARE. #include light_h +#include "core/reference.h" + #include "scene/3d/world_environment.h" #include "scene/main/node.h" +class Environment; + class EnvironmentData : public Resource { GDCLASS(EnvironmentData, Resource); diff --git a/modules/voxelman/world/jobs/voxel_prop_job.cpp b/modules/voxelman/world/jobs/voxel_prop_job.cpp index fb495b7cf..98df6bbc8 100644 --- a/modules/voxelman/world/jobs/voxel_prop_job.cpp +++ b/modules/voxelman/world/jobs/voxel_prop_job.cpp @@ -32,6 +32,8 @@ SOFTWARE. #include "../../library/voxel_material_cache.h" #include "../default/voxel_chunk_default.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" #ifdef MESH_DATA_RESOURCE_PRESENT #include "../../../mesh_data_resource/mesh_data_resource.h" diff --git a/modules/voxelman/world/jobs/voxel_terrain_job.cpp b/modules/voxelman/world/jobs/voxel_terrain_job.cpp index 3d4081fe3..e3bec2644 100644 --- a/modules/voxelman/world/jobs/voxel_terrain_job.cpp +++ b/modules/voxelman/world/jobs/voxel_terrain_job.cpp @@ -30,6 +30,7 @@ SOFTWARE. #include "../../library/voxel_material_cache.h" #include "../default/voxel_chunk_default.h" +#include "servers/physics_server.h" #ifdef MESH_UTILS_PRESENT #include "../../../mesh_utils/fast_quadratic_mesh_simplifier.h" diff --git a/modules/voxelman/world/voxel_chunk.cpp b/modules/voxelman/world/voxel_chunk.cpp index d9e5f8559..669122c3c 100644 --- a/modules/voxelman/world/voxel_chunk.cpp +++ b/modules/voxelman/world/voxel_chunk.cpp @@ -30,6 +30,7 @@ SOFTWARE. #include "jobs/voxel_job.h" #include "voxel_structure.h" +#include "servers/physics_server.h" #if THREAD_POOL_PRESENT #include "../../thread_pool/thread_pool.h" diff --git a/modules/voxelman/world/voxel_world_editor.cpp b/modules/voxelman/world/voxel_world_editor.cpp index 1643f22b6..029cb828a 100644 --- a/modules/voxelman/world/voxel_world_editor.cpp +++ b/modules/voxelman/world/voxel_world_editor.cpp @@ -35,6 +35,8 @@ SOFTWARE. #include "../library/voxel_surface.h" #include "../library/voxel_library.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" #include "../defines.h" diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 04ccef394..4df043b7c 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -32,6 +32,8 @@ #include "export_plugin.h" +#include "editor/editor_settings.h" + void register_android_exporter() { String exe_ext; if (OS::get_singleton()->get_name() == "Windows") { diff --git a/platform/android/export/gradle_export_util.cpp b/platform/android/export/gradle_export_util.cpp index 11cbc4d13..418aea84c 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/project_settings.h" + int _get_android_orientation_value(OS::ScreenOrientation screen_orientation) { switch (screen_orientation) { case OS::SCREEN_PORTRAIT: diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 37c228df9..d19b53b25 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -41,6 +41,8 @@ #include "platform/javascript/logo.gen.h" #include "platform/javascript/run_icon.gen.h" +#include "core/project_settings.h" + class EditorHTTPServer : public Reference { private: Ref server; diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 94191fc92..91cd903be 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -44,6 +44,7 @@ #include "editor/editor_settings.h" #include "modules/modules_enabled.gen.h" // For regex. #include "platform/osx/logo.gen.h" +#include "editor/editor_settings.h" #include diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp index 52b7e4107..33bfbc4a7 100644 --- a/platform/windows/export/export.cpp +++ b/platform/windows/export/export.cpp @@ -37,6 +37,8 @@ #include "editor/editor_settings.h" #include "platform/windows/logo.gen.h" +#include "core/project_settings.h" + static Error fixup_embedded_pck(const String &p_path, int64_t p_embedded_start, int64_t p_embedded_size); class EditorExportPlatformWindows : public EditorExportPlatformPC { diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp index 437267296..e65b922ad 100644 --- a/scene/2d/area_2d.cpp +++ b/scene/2d/area_2d.cpp @@ -32,6 +32,7 @@ #include "scene/scene_string_names.h" #include "servers/audio_server.h" #include "servers/physics_2d_server.h" +#include "scene/resources/world.h" void Area2D::set_space_override_mode(SpaceOverride p_mode) { space_override = p_mode; diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index 7c43e5b96..48b85916b 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -36,6 +36,8 @@ #include "scene/main/viewport.h" #include "servers/audio_server.h" #include "servers/audio/audio_stream.h" +#include "servers/physics_2d_server.h" +#include "scene/resources/world_2d.h" void AudioStreamPlayer2D::_mix_audio() { if (!stream_playback.is_valid() || !active.is_set() || diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index e0e8f6f38..3746a941d 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -41,6 +41,8 @@ #include "scene/scene_string_names.h" #include "servers/visual/visual_server_raster.h" #include "servers/visual_server.h" +#include "scene/resources/world.h" +#include "scene/resources/world_2d.h" #include "scene/main/scene_tree.h" #include "scene/resources/multimesh.h" diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h index 83a1d9b20..93ac5f201 100644 --- a/scene/2d/canvas_item.h +++ b/scene/2d/canvas_item.h @@ -39,6 +39,7 @@ class Viewport; class Font; class MultiMesh; class StyleBox; +class World2D; class CanvasItemMaterial : public Material { GDCLASS(CanvasItemMaterial, Material); diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 5dc8f6c4a..6adfc4e3a 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -32,6 +32,7 @@ #include "scene/scene_string_names.h" #include "servers/physics_2d_server.h" +#include "scene/resources/world_2d.h" void CollisionObject2D::_notification(int p_what) { switch (p_what) { diff --git a/scene/2d/mesh_instance_2d.cpp b/scene/2d/mesh_instance_2d.cpp index 633c21828..e6610f2a2 100644 --- a/scene/2d/mesh_instance_2d.cpp +++ b/scene/2d/mesh_instance_2d.cpp @@ -30,6 +30,8 @@ #include "mesh_instance_2d.h" +#include "scene/resources/mesh.h" + void MeshInstance2D::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { if (mesh.is_valid()) { diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index df08bb3a7..0d5ad7aaa 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -40,6 +40,7 @@ #include "scene/scene_string_names.h" #include "scene/resources/physics_material.h" #include "servers/physics_2d_server.h" +#include "core/project_settings.h" void PhysicsBody2D::_notification(int p_what) { } diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 2ca044a78..d1f4b3b31 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -33,6 +33,7 @@ #include "core/vset.h" #include "scene/2d/collision_object_2d.h" +#include "servers/physics_2d_server.h" class PhysicsMaterial; class KinematicCollision2D; diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp index 4d8d5d077..649bcdf60 100644 --- a/scene/2d/ray_cast_2d.cpp +++ b/scene/2d/ray_cast_2d.cpp @@ -34,6 +34,7 @@ #include "core/engine.h" #include "physics_body_2d.h" #include "servers/physics_2d_server.h" +#include "scene/resources/world_2d.h" void RayCast2D::set_cast_to(const Vector2 &p_point) { cast_to = p_point; diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp index a5228d211..2ddd46c25 100644 --- a/scene/2d/visibility_notifier_2d.cpp +++ b/scene/2d/visibility_notifier_2d.cpp @@ -36,6 +36,8 @@ #include "scene/animation/animation_player.h" #include "scene/main/viewport.h" #include "scene/scene_string_names.h" +#include "scene/resources/world_2d.h" + #ifdef TOOLS_ENABLED Rect2 VisibilityNotifier2D::_edit_get_rect() const { diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index e743a1dff..6322adee8 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -32,6 +32,7 @@ #include "scene/scene_string_names.h" #include "servers/audio_server.h" #include "servers/physics_server.h" +#include "scene/resources/shape.h" void Area::set_space_override_mode(SpaceOverride p_mode) { space_override = p_mode; diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index f3c750d6d..fb326389c 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -36,6 +36,9 @@ #include "scene/main/viewport.h" #include "scene/3d/spatial_velocity_tracker.h" #include "servers/audio/audio_stream.h" +#include "servers/physics_server.h" +#include "scene/resources/world.h" +#include "scene/resources/shape.h" // Based on "A Novel Multichannel Panning Method for Standard and Arbitrary Loudspeaker Configurations" by Ramy Sadek and Chris Kyriakakis (2004) // Speaker-Placement Correction Amplitude Panning (SPCAP) diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 99579e53f..d2f189cbe 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -38,7 +38,7 @@ #include "scene/3d/spatial_velocity_tracker.h" #include "scene/main/viewport.h" #include "scene/resources/environment.h" - +#include "scene/resources/world.h" void Camera::_update_audio_listener_state() { } diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 8c1288846..10e8e6658 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -35,6 +35,8 @@ #include "scene/scene_string_names.h" #include "servers/physics_server.h" #include "scene/resources/shape.h" +#include "scene/resources/world.h" +#include "scene/resources/mesh.h" void CollisionObject::_notification(int p_what) { switch (p_what) { diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp index 16cdd2255..9cd2c386e 100644 --- a/scene/3d/collision_polygon.cpp +++ b/scene/3d/collision_polygon.cpp @@ -34,6 +34,7 @@ #include "scene/resources/concave_polygon_shape.h" #include "scene/resources/convex_polygon_shape.h" #include "scene/resources/shape.h" +#include "core/math/geometry.h" void CollisionPolygon::_build_polygon() { if (!parent) { diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp index 44bf19fe8..d2c2e3b2f 100644 --- a/scene/3d/collision_shape.cpp +++ b/scene/3d/collision_shape.cpp @@ -42,6 +42,7 @@ #include "scene/resources/sphere_shape.h" #include "servers/visual_server.h" #include "scene/resources/shape.h" +#include "scene/resources/mesh.h" void CollisionShape::make_convex_from_brothers() { Node *p = get_parent(); diff --git a/scene/3d/collision_shape.h b/scene/3d/collision_shape.h index e177428e6..a40aae3b0 100644 --- a/scene/3d/collision_shape.h +++ b/scene/3d/collision_shape.h @@ -35,7 +35,7 @@ #include "core/reference.h" class CollisionObject; -class shape; +class Shape; class CollisionShape : public Spatial { GDCLASS(CollisionShape, Spatial); diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index 9c678c130..e3f142a67 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -35,6 +35,9 @@ #include "scene/resources/particles_material.h" #include "servers/visual_server.h" #include "scene/main/viewport.h" +#include "scene/resources/curve.h" +#include "scene/resources/gradient.h" +#include "scene/resources/mesh.h" AABB CPUParticles::get_aabb() const { return AABB(); diff --git a/scene/3d/cpu_particles.h b/scene/3d/cpu_particles.h index 4c9e06422..7e41ac6bb 100644 --- a/scene/3d/cpu_particles.h +++ b/scene/3d/cpu_particles.h @@ -34,6 +34,10 @@ #include "core/rid.h" #include "core/safe_refcount.h" #include "scene/3d/visual_instance.h" +#include "core/reference.h" + +class Curve; +class Gradient; class CPUParticles : public GeometryInstance { private: diff --git a/scene/3d/navigation_agent.cpp b/scene/3d/navigation_agent.cpp index 6baf7d078..3512115a1 100644 --- a/scene/3d/navigation_agent.cpp +++ b/scene/3d/navigation_agent.cpp @@ -33,6 +33,7 @@ #include "core/engine.h" #include "scene/3d/navigation.h" #include "servers/navigation_server.h" +#include "core/math/geometry.h" void NavigationAgent::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rid"), &NavigationAgent::get_rid); diff --git a/scene/3d/navigation_mesh_instance.cpp b/scene/3d/navigation_mesh_instance.cpp index 6ebfd50ae..2397fb119 100644 --- a/scene/3d/navigation_mesh_instance.cpp +++ b/scene/3d/navigation_mesh_instance.cpp @@ -30,7 +30,6 @@ #include "navigation_mesh_instance.h" -#include "core/os/thread.h" #include "mesh_instance.h" #include "navigation.h" #include "servers/navigation_server.h" diff --git a/scene/3d/navigation_mesh_instance.h b/scene/3d/navigation_mesh_instance.h index 59a6baa3d..df681c318 100644 --- a/scene/3d/navigation_mesh_instance.h +++ b/scene/3d/navigation_mesh_instance.h @@ -32,6 +32,7 @@ #define NAVIGATION_MESH_INSTANCE_H #include "scene/3d/spatial.h" +#include "core/os/thread.h" class Mesh; class Navigation; diff --git a/scene/3d/navigation_obstacle.cpp b/scene/3d/navigation_obstacle.cpp index f27b4bed2..b1292f9a3 100644 --- a/scene/3d/navigation_obstacle.cpp +++ b/scene/3d/navigation_obstacle.cpp @@ -35,6 +35,7 @@ #include "scene/3d/physics_body.h" #include "servers/navigation_server.h" #include "scene/3d/spatial.h" +#include "scene/resources/shape.h" void NavigationObstacle::_bind_methods() { ClassDB::bind_method(D_METHOD("set_navigation", "navigation"), &NavigationObstacle::set_navigation_node); diff --git a/scene/3d/occluder.cpp b/scene/3d/occluder.cpp index 11f2d6848..26fa4247f 100644 --- a/scene/3d/occluder.cpp +++ b/scene/3d/occluder.cpp @@ -33,6 +33,8 @@ #include "core/engine.h" #include "servers/visual/portals/portal_occlusion_culler.h" #include "scene/resources/occluder_shape.h" +#include "servers/visual_server.h" +#include "scene/resources/world.h" void Occluder::resource_changed(RES res) { update_gizmo(); diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 2739aa5ea..aa229333c 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -39,6 +39,7 @@ #include "scene/scene_string_names.h" #include "scene/resources/physics_material.h" #include "skeleton.h" +#include "core/project_settings.h" #ifdef TOOLS_ENABLED #include "editor/plugins/spatial_editor_plugin.h" diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp index 9924ca1a6..42115765d 100644 --- a/scene/3d/physics_joint.cpp +++ b/scene/3d/physics_joint.cpp @@ -32,6 +32,7 @@ #include "scene/scene_string_names.h" #include "scene/3d/physics_body.h" +#include "scene/resources/shape.h" void Joint::_disconnect_signals() { Node *node_a = get_node_or_null(a); diff --git a/scene/3d/physics_joint.h b/scene/3d/physics_joint.h index ec8c2d621..c0dd90441 100644 --- a/scene/3d/physics_joint.h +++ b/scene/3d/physics_joint.h @@ -32,6 +32,7 @@ #define PHYSICS_JOINT_H #include "scene/3d/spatial.h" +#include "servers/physics_server.h" class PhysicsBody; diff --git a/scene/3d/portal.cpp b/scene/3d/portal.cpp index e2e918bb5..fe719594c 100644 --- a/scene/3d/portal.cpp +++ b/scene/3d/portal.cpp @@ -37,6 +37,8 @@ #include "room_manager.h" #include "scene/main/viewport.h" #include "servers/visual_server.h" +#include "scene/resources/world.h" +#include "scene/resources/mesh.h" bool Portal::_portal_plane_convention = false; bool Portal::_settings_gizmo_show_margins = true; diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index 06e0d2d13..f340fd93c 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -34,6 +34,9 @@ #include "core/engine.h" #include "mesh_instance.h" #include "servers/physics_server.h" +#include "scene/resources/material.h" +#include "scene/resources/world.h" +#include "scene/resources/mesh.h" void RayCast::set_cast_to(const Vector3 &p_point) { cast_to = p_point; @@ -515,3 +518,6 @@ RayCast::RayCast() { collide_with_areas = false; collide_with_bodies = true; } + +RayCast::~RayCast() { +} diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h index d64823b61..e3eaafb5b 100644 --- a/scene/3d/ray_cast.h +++ b/scene/3d/ray_cast.h @@ -33,6 +33,8 @@ #include "scene/3d/spatial.h" +class SpatialMaterial; + class RayCast : public Spatial { GDCLASS(RayCast, Spatial); @@ -117,6 +119,7 @@ public: void clear_exceptions(); RayCast(); + ~RayCast(); }; #endif // RAY_CAST_H diff --git a/scene/3d/room.cpp b/scene/3d/room.cpp index 479428b2b..38d83f250 100644 --- a/scene/3d/room.cpp +++ b/scene/3d/room.cpp @@ -34,6 +34,7 @@ #include "room_group.h" #include "room_manager.h" #include "servers/visual_server.h" +#include "scene/resources/world.h" void Room::SimplifyInfo::set_simplify(real_t p_value, real_t p_room_size) { _plane_simplify = CLAMP(p_value, 0.0, 1.0); diff --git a/scene/3d/room.h b/scene/3d/room.h index b529d9ca0..a80ab131c 100644 --- a/scene/3d/room.h +++ b/scene/3d/room.h @@ -34,6 +34,7 @@ #include "core/local_vector.h" #include "core/rid.h" #include "spatial.h" +#include "core/math/geometry.h" class Portal; diff --git a/scene/3d/room_group.cpp b/scene/3d/room_group.cpp index 175f02ea2..6f60ac171 100644 --- a/scene/3d/room_group.cpp +++ b/scene/3d/room_group.cpp @@ -32,6 +32,10 @@ #include "room.h" #include "room_manager.h" +#include "core/math/geometry.h" +#include "servers/visual_server.h" +#include "scene/resources/world.h" +#include "scene/resources/mesh.h" void RoomGroup::_bind_methods() { ClassDB::bind_method(D_METHOD("set_roomgroup_priority", "p_priority"), &RoomGroup::set_roomgroup_priority); diff --git a/scene/3d/room_manager.cpp b/scene/3d/room_manager.cpp index 0a18ec5d9..f537e141b 100644 --- a/scene/3d/room_manager.cpp +++ b/scene/3d/room_manager.cpp @@ -44,6 +44,9 @@ #include "scene/3d/sprite_3d.h" #include "visibility_notifier.h" #include "scene/resources/multimesh.h" +#include "core/math/geometry.h" +#include "scene/resources/world.h" +#include "core/project_settings.h" #ifdef TOOLS_ENABLED #include "editor/plugins/spatial_editor_plugin.h" diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp index 669c3c001..d46df2dff 100644 --- a/scene/3d/soft_body.cpp +++ b/scene/3d/soft_body.cpp @@ -37,6 +37,8 @@ #include "scene/3d/physics_body.h" #include "scene/3d/skeleton.h" #include "servers/physics_server.h" +#include "scene/resources/world.h" +#include "scene/resources/mesh.h" SoftBodyVisualServerHandler::SoftBodyVisualServerHandler() {} diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index f4f238142..96c09489d 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -37,6 +37,7 @@ #include "scene/main/viewport.h" #include "scene/scene_string_names.h" #include "servers/visual_server_callbacks.h" +#include "scene/resources/world.h" /* diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h index 0091fde1e..f9e978a5e 100644 --- a/scene/3d/spatial.h +++ b/scene/3d/spatial.h @@ -34,6 +34,8 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" +class World; + class SpatialGizmo : public Reference { GDCLASS(SpatialGizmo, Reference); diff --git a/scene/3d/spring_arm.cpp b/scene/3d/spring_arm.cpp index 0896ac96e..f93631f78 100644 --- a/scene/3d/spring_arm.cpp +++ b/scene/3d/spring_arm.cpp @@ -33,6 +33,8 @@ #include "scene/3d/collision_object.h" #include "scene/resources/sphere_shape.h" #include "servers/physics_server.h" +#include "scene/resources/shape.h" +#include "scene/resources/world.h" SpringArm::SpringArm() : spring_length(1), diff --git a/scene/3d/spring_arm.h b/scene/3d/spring_arm.h index 16b4268eb..4024b869f 100644 --- a/scene/3d/spring_arm.h +++ b/scene/3d/spring_arm.h @@ -32,6 +32,9 @@ #define SPRING_ARM_H #include "scene/3d/spatial.h" +#include "core/reference.h" + +class Shape; class SpringArm : public Spatial { GDCLASS(SpringArm, Spatial); diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index d4959102d..d5b7d7379 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -32,6 +32,7 @@ #include "core/core_string_names.h" #include "scene/scene_string_names.h" #include "scene/2d/animated_sprite.h" +#include "core/math/triangle_mesh.h" Color SpriteBase3D::_get_color_accum() { if (!color_dirty) { diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index 94b7ed3e0..d4283a611 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -33,7 +33,9 @@ #include "scene/3d/visual_instance.h" #include "core/reference.h" +#include "scene/resources/material.h" +class TriangleMesh; class SpriteFrames; class SpriteBase3D : public GeometryInstance { diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 0164fd9fb..afdef672c 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -30,6 +30,8 @@ #include "vehicle_body.h" +#include "scene/resources/shape.h" + #define ROLLING_INFLUENCE_FIX class btVehicleJacobianEntry { diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp index acc1ec3e6..25799a60e 100644 --- a/scene/3d/visibility_notifier.cpp +++ b/scene/3d/visibility_notifier.cpp @@ -37,6 +37,8 @@ #include "scene/animation/animation_tree.h" #include "scene/animation/animation_tree_player.h" #include "scene/scene_string_names.h" +#include "scene/resources/world.h" +#include "scene/resources/shape.h" void VisibilityNotifier::_enter_camera(Camera *p_camera) { ERR_FAIL_COND(cameras.has(p_camera)); diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index 473bed50b..9ff7d7c70 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -34,6 +34,8 @@ #include "servers/visual_server.h" #include "skeleton.h" #include "scene/resources/material.h" +#include "servers/visual_server.h" +#include "scene/resources/world.h" AABB VisualInstance::get_transformed_aabb() const { return get_global_transform().xform(get_aabb()); diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h index c0c8985dd..492e81ace 100644 --- a/scene/3d/visual_instance.h +++ b/scene/3d/visual_instance.h @@ -35,6 +35,7 @@ #include "core/rid.h" #include "scene/3d/cull_instance.h" #include "core/reference.h" +#include "servers/visual_server.h" class Material; diff --git a/scene/3d/world_environment.cpp b/scene/3d/world_environment.cpp index 3378515c6..cd41e073e 100644 --- a/scene/3d/world_environment.cpp +++ b/scene/3d/world_environment.cpp @@ -30,6 +30,10 @@ #include "world_environment.h" #include "scene/main/viewport.h" +#include "scene/3d/spatial.h" + +#include "scene/resources/environment.h" +#include "scene/resources/world.h" void WorldEnvironment::_notification(int p_what) { if (p_what == Spatial::NOTIFICATION_ENTER_WORLD || p_what == Spatial::NOTIFICATION_ENTER_TREE) { diff --git a/scene/3d/world_environment.h b/scene/3d/world_environment.h index 2cb625fb3..b75650f8c 100644 --- a/scene/3d/world_environment.h +++ b/scene/3d/world_environment.h @@ -31,7 +31,10 @@ #ifndef SCENARIO_FX_H #define SCENARIO_FX_H -#include "scene/3d/spatial.h" +#include "scene/main/node.h" +#include "core/reference.h" + +class Environment; class WorldEnvironment : public Node { GDCLASS(WorldEnvironment, Node); diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp index b43fe500e..a119d055d 100644 --- a/scene/animation/animation_blend_space_2d.cpp +++ b/scene/animation/animation_blend_space_2d.cpp @@ -30,6 +30,7 @@ #include "animation_blend_space_2d.h" #include "core/math/delaunay.h" +#include "core/math/geometry.h" void AnimationNodeBlendSpace2D::get_parameter_list(List *r_list) const { r_list->push_back(PropertyInfo(Variant::VECTOR2, blend_position)); diff --git a/scene/debugger/script_debugger_remote.cpp b/scene/debugger/script_debugger_remote.cpp index c1889a628..1886b4ab6 100644 --- a/scene/debugger/script_debugger_remote.cpp +++ b/scene/debugger/script_debugger_remote.cpp @@ -41,6 +41,8 @@ #include "scene/main/viewport.h" #include "scene/resources/packed_scene.h" #include "servers/visual_server.h" +#include "core/io/resource_loader.h" +#include "core/io/resource_saver.h" void ScriptDebuggerRemote::_send_video_memory() { List usage; diff --git a/scene/gui/nine_patch_rect.cpp b/scene/gui/nine_patch_rect.cpp index 81441541c..64a94ebae 100644 --- a/scene/gui/nine_patch_rect.cpp +++ b/scene/gui/nine_patch_rect.cpp @@ -31,6 +31,7 @@ #include "nine_patch_rect.h" #include "servers/visual_server.h" +#include "core/project_settings.h" void NinePatchRect::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index ce2b5ca44..26437480a 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -36,6 +36,7 @@ #include "core/translation.h" #include "scene/gui/shortcut.h" #include "scene/main/timer.h" +#include "core/project_settings.h" PopupMenu::Item::Item() { checked = false; diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index 6e6cf83eb..21d9a0b45 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -32,6 +32,7 @@ #include "core/os/os.h" #include "scene/main/viewport.h" #include "scroll_bar.h" +#include "core/project_settings.h" bool ScrollContainer::clips_input() const { return true; diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a9f5c62e2..ac33a0419 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -38,6 +38,9 @@ #include "core/script_language.h" #include "scene/main/viewport.h" #include "scene/gui/shortcut.h" +#include "scene/gui/popup_menu.h" +#include "scene/gui/scroll_bar.h" +#include "scene/main/timer.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 717272cf1..ddf989e5e 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -32,11 +32,12 @@ #define TEXT_EDIT_H #include "scene/gui/control.h" -#include "scene/gui/popup_menu.h" -#include "scene/gui/scroll_bar.h" -#include "scene/main/timer.h" class SyntaxHighlighter; +class PopupMenu; +class Timer; +class HScrollBar; +class VScrollBar; class TextEdit : public Control { GDCLASS(TextEdit, Control); diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index 2aa77172d..792d12c51 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -31,6 +31,7 @@ #include "canvas_layer.h" #include "scene/2d/canvas_item.h" #include "viewport.h" +#include "scene/resources/world_2d.h" void CanvasLayer::set_layer(int p_xform) { layer = p_xform; diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h index 130fade64..32a84dac2 100644 --- a/scene/main/canvas_layer.h +++ b/scene/main/canvas_layer.h @@ -32,9 +32,9 @@ #define CANVAS_LAYER_H #include "scene/main/node.h" -#include "scene/resources/world_2d.h" class Viewport; + class CanvasLayer : public Node { GDCLASS(CanvasLayer, Node); diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index a5c2beecc..65571907b 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -30,6 +30,10 @@ #include "http_request.h" +#include "core/os/thread.h" +#include "core/os/file_access.h" +#include "scene/main/timer.h" + void HTTPRequest::_redirect_request(const String &p_new_url) { } diff --git a/scene/main/http_request.h b/scene/main/http_request.h index e8afa7a45..4556b4952 100644 --- a/scene/main/http_request.h +++ b/scene/main/http_request.h @@ -31,12 +31,12 @@ #ifndef HTTPREQUEST_H #define HTTPREQUEST_H -#include "core/io/http_client.h" -#include "core/os/file_access.h" -#include "core/os/thread.h" -#include "core/safe_refcount.h" #include "node.h" -#include "scene/main/timer.h" +#include "core/io/http_client.h" +#include "core/safe_refcount.h" +#include "core/os/thread.h" + +class Timer; class HTTPRequest : public Node { GDCLASS(HTTPRequest, Node); diff --git a/scene/main/node.cpp b/scene/main/node.cpp index d16a65f93..eee843017 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -39,6 +39,10 @@ #include "scene/scene_string_names.h" #include "viewport.h" +#include "core/project_settings.h" +#include "core/script_language.h" +#include "core/class_db.h" + #ifdef TOOLS_ENABLED #include "editor/editor_settings.h" #endif diff --git a/scene/main/node.h b/scene/main/node.h index 3609ce7d8..795e5743c 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -31,16 +31,15 @@ #ifndef NODE_H #define NODE_H -#include "core/class_db.h" +#include "core/object.h" + #include "core/map.h" #include "core/node_path.h" -#include "core/object.h" -#include "core/project_settings.h" -#include "core/script_language.h" #include "scene/main/scene_tree.h" class Viewport; class SceneState; + class Node : public Object { GDCLASS(Node, Object); OBJ_CATEGORY("Nodes"); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 30afb55f0..a0c457f2f 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -53,6 +53,9 @@ #include "scene/3d/spatial.h" #include "modules/modules_enabled.gen.h" // For freetype. +#include "scene/resources/world.h" +#include "scene/resources/world_2d.h" +#include "scene/resources/mesh.h" #include #include diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 1184df0a5..2aef8095d 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -35,9 +35,6 @@ #include "core/os/main_loop.h" #include "core/os/thread_safe.h" #include "core/self_list.h" -#include "scene/resources/mesh.h" -#include "scene/resources/world.h" -#include "scene/resources/world_2d.h" class PackedScene; class Node; @@ -45,6 +42,7 @@ class Spatial; class Viewport; class Material; class Mesh; +class ArrayMesh; class SceneTreeTimer : public Reference { GDCLASS(SceneTreeTimer, Reference); diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 605acf01a..1aa096dbd 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -54,6 +54,8 @@ #include "scene/scene_string_names.h" #include "servers/physics_2d_server.h" #include "scene/gui/shortcut.h" +#include "scene/resources/world.h" +#include "scene/resources/world_2d.h" void ViewportTexture::setup_local_to_scene() { Node *local_scene = get_local_scene(); diff --git a/scene/main/viewport.h b/scene/main/viewport.h index 6d9a3d1b1..3b90c3f66 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -34,7 +34,6 @@ #include "core/math/transform_2d.h" #include "scene/main/node.h" #include "scene/resources/texture.h" -#include "scene/resources/world_2d.h" #include "servers/visual_server.h" class Camera; @@ -50,6 +49,8 @@ class Timer; class Viewport; class CollisionObject; class SceneTreeTimer; +class World; +class World2D; class ViewportTexture : public Texture { GDCLASS(ViewportTexture, Texture); diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp index f5d33eb5f..a593c3454 100644 --- a/scene/resources/world.cpp +++ b/scene/resources/world.cpp @@ -35,6 +35,7 @@ #include "scene/3d/camera.h" #include "scene/3d/visibility_notifier.h" #include "scene/scene_string_names.h" +#include "core/project_settings.h" struct SpatialIndexer { Octree octree;