diff --git a/editor/template_builders.py b/editor/template_builders.py index 4dbe03788a4..54a52467eec 100644 --- a/editor/template_builders.py +++ b/editor/template_builders.py @@ -62,8 +62,8 @@ def make_templates(target, source, env): with methods.generated_wrapper(str(target[0])) as file: file.write(f"""\ -#include "core/object/object.h" #include "core/object/script_language.h" +#include "core/string/ustring.h" inline constexpr int TEMPLATES_ARRAY_SIZE = {len(parsed_templates)}; static const struct ScriptLanguage::ScriptTemplate TEMPLATES[TEMPLATES_ARRAY_SIZE] = {{ diff --git a/modules/camera/camera_feed_linux.cpp b/modules/camera/camera_feed_linux.cpp index 8c3f717f8e5..70490a01431 100644 --- a/modules/camera/camera_feed_linux.cpp +++ b/modules/camera/camera_feed_linux.cpp @@ -350,8 +350,7 @@ bool CameraFeedLinux::set_format(int p_index, const Dictionary &p_parameters) { return true; } -CameraFeedLinux::CameraFeedLinux(const String &p_device_name) : - CameraFeed() { +CameraFeedLinux::CameraFeedLinux(const String &p_device_name) { device_name = p_device_name; _query_device(device_name); } diff --git a/modules/camera/camera_linux.h b/modules/camera/camera_linux.h index ca1eeb0a21c..f1920b727cf 100644 --- a/modules/camera/camera_linux.h +++ b/modules/camera/camera_linux.h @@ -32,6 +32,7 @@ #include "core/os/mutex.h" #include "core/os/thread.h" +#include "core/templates/safe_refcount.h" #include "servers/camera/camera_server.h" class CameraLinux : public CameraServer { diff --git a/modules/camera/camera_win.cpp b/modules/camera/camera_win.cpp index 7871595d91e..5cff87020e8 100644 --- a/modules/camera/camera_win.cpp +++ b/modules/camera/camera_win.cpp @@ -30,6 +30,8 @@ #include "camera_win.h" +#include "servers/camera/camera_feed.h" + ///@TODO sorry guys, I got about 80% through implementing this using DirectShow only // to find out Microsoft deprecated half the API and its replacement is as confusing // as they could make it. Joey suggested looking into libuvc which offers a more direct diff --git a/modules/camera/camera_win.h b/modules/camera/camera_win.h index 60b4858a0d6..9d98766ab97 100644 --- a/modules/camera/camera_win.h +++ b/modules/camera/camera_win.h @@ -30,7 +30,6 @@ #pragma once -#include "servers/camera/camera_feed.h" #include "servers/camera/camera_server.h" class CameraWindows : public CameraServer { diff --git a/modules/csg/editor/csg_gizmos.cpp b/modules/csg/editor/csg_gizmos.cpp index 0ff24173138..945e4513454 100644 --- a/modules/csg/editor/csg_gizmos.cpp +++ b/modules/csg/editor/csg_gizmos.cpp @@ -32,7 +32,6 @@ #include "core/math/geometry_3d.h" #include "core/object/callable_mp.h" -#include "core/object/class_db.h" #include "editor/editor_node.h" #include "editor/editor_undo_redo_manager.h" #include "editor/scene/3d/gizmos/gizmo_3d_helper.h" diff --git a/modules/csg/tests/test_csg.h b/modules/csg/tests/test_csg.h index 1512645adf1..c7d797c5b85 100644 --- a/modules/csg/tests/test_csg.h +++ b/modules/csg/tests/test_csg.h @@ -30,9 +30,10 @@ #pragma once -#include "../csg.h" #include "../csg_shape.h" + #include "scene/main/scene_tree.h" +#include "scene/main/window.h" #include "tests/test_macros.h" diff --git a/modules/enet/enet_multiplayer_peer.h b/modules/enet/enet_multiplayer_peer.h index e56df733d38..a6d882f1c25 100644 --- a/modules/enet/enet_multiplayer_peer.h +++ b/modules/enet/enet_multiplayer_peer.h @@ -32,7 +32,6 @@ #include "enet_connection.h" -#include "core/crypto/crypto.h" #include "scene/main/multiplayer_peer.h" #include diff --git a/modules/fbx/fbx_state.h b/modules/fbx/fbx_state.h index dff450c76f0..94e93faca65 100644 --- a/modules/fbx/fbx_state.h +++ b/modules/fbx/fbx_state.h @@ -32,9 +32,7 @@ #include "modules/gltf/gltf_defines.h" #include "modules/gltf/gltf_state.h" -#include "modules/gltf/structures/gltf_skeleton.h" #include "modules/gltf/structures/gltf_skin.h" -#include "modules/gltf/structures/gltf_texture.h" #include diff --git a/modules/gdscript/editor/gdscript_docgen.cpp b/modules/gdscript/editor/gdscript_docgen.cpp index 3d57db7f647..6ac65d4cd5d 100644 --- a/modules/gdscript/editor/gdscript_docgen.cpp +++ b/modules/gdscript/editor/gdscript_docgen.cpp @@ -33,6 +33,7 @@ #include "../gdscript.h" #include "core/config/project_settings.h" +#include "core/doc_data.h" HashMap GDScriptDocGen::singletons; diff --git a/modules/gdscript/editor/gdscript_docgen.h b/modules/gdscript/editor/gdscript_docgen.h index 360906fe898..5975c4b7d1f 100644 --- a/modules/gdscript/editor/gdscript_docgen.h +++ b/modules/gdscript/editor/gdscript_docgen.h @@ -32,8 +32,6 @@ #include "../gdscript_parser.h" -#include "core/doc_data.h" - class GDScriptDocGen { using GDP = GDScriptParser; using GDType = GDP::DataType; diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 9d38d6cef03..45435f5381c 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -37,7 +37,6 @@ #include "core/core_constants.h" #include "core/object/class_db.h" #include "editor/settings/editor_settings.h" -#include "editor/themes/editor_theme_manager.h" #include "scene/gui/text_edit.h" Dictionary GDScriptSyntaxHighlighter::_get_line_syntax_highlighting_impl(int p_line) { diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index 14076280383..581f1c8978a 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -30,7 +30,6 @@ #include "gdscript_byte_codegen.h" -#include "core/debugger/engine_debugger.h" #include "core/object/class_db.h" uint32_t GDScriptByteCodeGenerator::add_parameter(const StringName &p_name, bool p_is_optional, const GDScriptDataType &p_type) { diff --git a/modules/gdscript/gdscript_codegen.h b/modules/gdscript/gdscript_codegen.h index 2ff31d51312..3d33e7649f0 100644 --- a/modules/gdscript/gdscript_codegen.h +++ b/modules/gdscript/gdscript_codegen.h @@ -31,7 +31,6 @@ #pragma once #include "gdscript_function.h" -#include "gdscript_utility_functions.h" #include "core/string/string_name.h" #include "core/variant/variant.h" diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index 2bf42ee503d..0358cae2334 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -40,8 +40,6 @@ #include "core/config/project_settings.h" #include "core/object/class_db.h" -#include "scene/scene_string_names.h" - bool GDScriptCompiler::_is_class_member_property(CodeGen &codegen, const StringName &p_name) { if (codegen.function_node && codegen.function_node->is_static) { return false; diff --git a/modules/gdscript/gdscript_disassembler.cpp b/modules/gdscript/gdscript_disassembler.cpp index d8cb1e89ab3..80e02acd1f1 100644 --- a/modules/gdscript/gdscript_disassembler.cpp +++ b/modules/gdscript/gdscript_disassembler.cpp @@ -33,7 +33,7 @@ #include "gdscript.h" #include "gdscript_function.h" -#include "core/object/class_db.h" +#include "core/object/method_bind.h" #include "core/string/string_builder.h" static String _get_variant_string(const Variant &p_variant) { diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp index c12fc0fafb2..2648781bce4 100644 --- a/modules/gdscript/language_server/gdscript_language_server.cpp +++ b/modules/gdscript/language_server/gdscript_language_server.cpp @@ -30,6 +30,8 @@ #include "gdscript_language_server.h" +#include "gdscript_language_protocol.h" + #include "core/os/os.h" #include "editor/editor_log.h" #include "editor/editor_node.h" diff --git a/modules/gdscript/language_server/gdscript_language_server.h b/modules/gdscript/language_server/gdscript_language_server.h index 07468ece8d5..8eb8bee6ffc 100644 --- a/modules/gdscript/language_server/gdscript_language_server.h +++ b/modules/gdscript/language_server/gdscript_language_server.h @@ -30,8 +30,6 @@ #pragma once -#include "gdscript_language_protocol.h" - #include "editor/plugins/editor_plugin.h" class GDScriptLanguageServer : public EditorPlugin { diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp index 94822e0b260..d931ab4f2eb 100644 --- a/modules/gdscript/language_server/gdscript_text_document.cpp +++ b/modules/gdscript/language_server/gdscript_text_document.cpp @@ -36,7 +36,7 @@ #include "core/object/callable_mp.h" #include "core/object/class_db.h" -#include "editor/script/script_text_editor.h" +#include "editor/script/script_editor_plugin.h" #include "editor/settings/editor_settings.h" #include "servers/display/display_server.h" diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp index 40e9d4b96cc..52f7397abeb 100644 --- a/modules/gdscript/register_types.cpp +++ b/modules/gdscript/register_types.cpp @@ -42,6 +42,7 @@ #include "editor/script/script_editor_plugin.h" #ifndef GDSCRIPT_NO_LSP +#include "language_server/gdscript_language_protocol.h" #include "language_server/gdscript_language_server.h" #endif #endif // TOOLS_ENABLED diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index e85fcc174fa..8d3d193cf42 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -39,7 +39,7 @@ #include "core/config/project_settings.h" #include "core/core_globals.h" #include "core/io/dir_access.h" -#include "core/io/file_access_pack.h" +#include "core/io/file_access.h" #include "core/object/class_db.h" #include "core/os/os.h" #include "core/string/string_builder.h" diff --git a/modules/gdscript/tests/gdscript_test_runner.h b/modules/gdscript/tests/gdscript_test_runner.h index 1e4641983bd..9d8475e7236 100644 --- a/modules/gdscript/tests/gdscript_test_runner.h +++ b/modules/gdscript/tests/gdscript_test_runner.h @@ -30,10 +30,9 @@ #pragma once -#include "../gdscript.h" - #include "core/error/error_macros.h" #include "core/string/print_string.h" +#include "core/string/string_name.h" #include "core/string/ustring.h" #include "core/templates/vector.h" diff --git a/modules/gdscript/tests/test_completion.h b/modules/gdscript/tests/test_completion.h index 3d0227899d4..dccf609bf87 100644 --- a/modules/gdscript/tests/test_completion.h +++ b/modules/gdscript/tests/test_completion.h @@ -48,7 +48,7 @@ #include "scene/resources/packed_scene.h" #include "scene/theme/theme_db.h" -#include "modules/modules_enabled.gen.h" // For mono. +#include "modules/modules_enabled.gen.h" // IWYU pragma: keep. For mono. namespace GDScriptTests { diff --git a/modules/gdscript/tests/test_gdscript.cpp b/modules/gdscript/tests/test_gdscript.cpp index 2ffe020396b..ea2c66588bf 100644 --- a/modules/gdscript/tests/test_gdscript.cpp +++ b/modules/gdscript/tests/test_gdscript.cpp @@ -35,6 +35,7 @@ #include "../gdscript_parser.h" #include "../gdscript_tokenizer.h" #include "../gdscript_tokenizer_buffer.h" +#include "gdscript_test_runner.h" #include "core/config/project_settings.h" #include "core/io/file_access.h" diff --git a/modules/gdscript/tests/test_gdscript.h b/modules/gdscript/tests/test_gdscript.h index 4330b05bab6..7d26abee7bd 100644 --- a/modules/gdscript/tests/test_gdscript.h +++ b/modules/gdscript/tests/test_gdscript.h @@ -30,10 +30,6 @@ #pragma once -#include "gdscript_test_runner.h" - -#include "tests/test_macros.h" - namespace GDScriptTests { enum TestType { diff --git a/modules/gdscript/tests/test_lsp.h b/modules/gdscript/tests/test_lsp.h index 631ede4f17f..866eef717a7 100644 --- a/modules/gdscript/tests/test_lsp.h +++ b/modules/gdscript/tests/test_lsp.h @@ -40,6 +40,7 @@ #include "../language_server/gdscript_language_protocol.h" #include "../language_server/gdscript_workspace.h" #include "../language_server/godot_lsp.h" +#include "gdscript_test_runner.h" #include "core/io/dir_access.h" #include "editor/file_system/editor_file_system.h" diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index 952c4805b5c..96a7b035eb8 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -30,10 +30,14 @@ #include "register_types.h" -#include "core/config/engine.h" -#include "core/os/os.h" #include "shader_compile.h" +#include "core/config/engine.h" + +#ifdef D3D12_ENABLED +#include "core/os/os.h" +#endif + GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Wshadow") #include diff --git a/modules/gltf/extensions/gltf_document_extension.cpp b/modules/gltf/extensions/gltf_document_extension.cpp index d6eadecec7d..733c075c03a 100644 --- a/modules/gltf/extensions/gltf_document_extension.cpp +++ b/modules/gltf/extensions/gltf_document_extension.cpp @@ -30,7 +30,7 @@ #include "gltf_document_extension.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `GDVIRTUAL_BIND` macro. void GLTFDocumentExtension::_bind_methods() { // Import process. diff --git a/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp b/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp index d36f166ee6c..9077e594be8 100644 --- a/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp +++ b/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp @@ -30,6 +30,9 @@ #include "gltf_document_extension_physics.h" +#include "gltf_physics_body.h" +#include "gltf_physics_shape.h" + #include "scene/3d/physics/area_3d.h" #include "scene/3d/physics/rigid_body_3d.h" #include "scene/3d/physics/static_body_3d.h" diff --git a/modules/gltf/extensions/physics/gltf_document_extension_physics.h b/modules/gltf/extensions/physics/gltf_document_extension_physics.h index 25385841fd8..b29df1e4955 100644 --- a/modules/gltf/extensions/physics/gltf_document_extension_physics.h +++ b/modules/gltf/extensions/physics/gltf_document_extension_physics.h @@ -31,8 +31,6 @@ #pragma once #include "../gltf_document_extension.h" -#include "gltf_physics_body.h" -#include "gltf_physics_shape.h" class GLTFDocumentExtensionPhysics : public GLTFDocumentExtension { GDCLASS(GLTFDocumentExtensionPhysics, GLTFDocumentExtension); diff --git a/modules/gltf/extensions/physics/gltf_physics_body.h b/modules/gltf/extensions/physics/gltf_physics_body.h index b691614000c..0de2c638d5c 100644 --- a/modules/gltf/extensions/physics/gltf_physics_body.h +++ b/modules/gltf/extensions/physics/gltf_physics_body.h @@ -30,7 +30,8 @@ #pragma once -#include "scene/3d/physics/physics_body_3d.h" +#include "core/io/resource.h" +#include "scene/3d/physics/collision_object_3d.h" // GLTFPhysicsBody is an intermediary between Godot's physics body nodes // and the OMI_physics_body extension. diff --git a/modules/gltf/extensions/physics/gltf_physics_shape.cpp b/modules/gltf/extensions/physics/gltf_physics_shape.cpp index a084ddc5246..d39f7515991 100644 --- a/modules/gltf/extensions/physics/gltf_physics_shape.cpp +++ b/modules/gltf/extensions/physics/gltf_physics_shape.cpp @@ -30,8 +30,6 @@ #include "gltf_physics_shape.h" -#include "../../gltf_state.h" - #include "core/math/convex_hull.h" #include "core/object/class_db.h" #include "scene/3d/physics/area_3d.h" diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 6eb727e98fd..87067d6d1f5 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -48,7 +48,6 @@ #include "core/object/class_db.h" #include "core/object/object_id.h" #include "core/version.h" -#include "scene/2d/node_2d.h" #include "scene/3d/bone_attachment_3d.h" #include "scene/3d/camera_3d.h" #include "scene/3d/importer_mesh_instance_3d.h" diff --git a/modules/gltf/register_types.cpp b/modules/gltf/register_types.cpp index 2969ebb7c4c..ee2524cb713 100644 --- a/modules/gltf/register_types.cpp +++ b/modules/gltf/register_types.cpp @@ -43,6 +43,8 @@ #ifndef PHYSICS_3D_DISABLED #include "extensions/physics/gltf_document_extension_physics.h" +#include "extensions/physics/gltf_physics_body.h" +#include "extensions/physics/gltf_physics_shape.h" #endif // PHYSICS_3D_DISABLED #ifdef TOOLS_ENABLED diff --git a/modules/gltf/skin_tool.cpp b/modules/gltf/skin_tool.cpp index 04cc6d2a6ab..3bb87aa0f31 100644 --- a/modules/gltf/skin_tool.cpp +++ b/modules/gltf/skin_tool.cpp @@ -30,6 +30,8 @@ #include "skin_tool.h" +#include "core/math/disjoint_set.h" + SkinNodeIndex SkinTool::_find_highest_node(Vector> &r_nodes, const Vector &p_subset) { int highest = -1; SkinNodeIndex best_node = -1; diff --git a/modules/gltf/skin_tool.h b/modules/gltf/skin_tool.h index c3604f2fb42..2e9d96fa4a2 100644 --- a/modules/gltf/skin_tool.h +++ b/modules/gltf/skin_tool.h @@ -36,7 +36,6 @@ #include "structures/gltf_skeleton.h" #include "structures/gltf_skin.h" -#include "core/math/disjoint_set.h" #include "core/templates/rb_set.h" using SkinNodeIndex = int; diff --git a/modules/gltf/tests/test_gltf.h b/modules/gltf/tests/test_gltf.h index 508c9be7c88..e89a4a7a53b 100644 --- a/modules/gltf/tests/test_gltf.h +++ b/modules/gltf/tests/test_gltf.h @@ -37,16 +37,9 @@ #include "core/config/project_settings.h" #include "core/io/dir_access.h" #include "core/object/class_db.h" -#include "drivers/png/image_loader_png.h" #include "editor/import/3d/resource_importer_scene.h" #include "editor/import/resource_importer_texture.h" -#include "editor/inspector/editor_resource_preview.h" -#include "scene/3d/mesh_instance_3d.h" -#include "scene/3d/skeleton_3d.h" -#include "scene/main/window.h" -#include "scene/resources/3d/primitive_meshes.h" #include "scene/resources/compressed_texture.h" -#include "scene/resources/material.h" #include "scene/resources/packed_scene.h" #include "tests/test_utils.h" diff --git a/modules/gltf/tests/test_gltf_extras.h b/modules/gltf/tests/test_gltf_extras.h index 67889ccd460..8c078b8327e 100644 --- a/modules/gltf/tests/test_gltf_extras.h +++ b/modules/gltf/tests/test_gltf_extras.h @@ -31,10 +31,11 @@ #pragma once #include "test_gltf.h" -#include "tests/test_macros.h" #ifdef TOOLS_ENABLED +#include "../editor/editor_scene_importer_gltf.h" + #include "editor/import/3d/resource_importer_scene.h" #include "scene/3d/mesh_instance_3d.h" #include "scene/3d/skeleton_3d.h" @@ -42,11 +43,7 @@ #include "scene/main/window.h" #include "scene/resources/3d/primitive_meshes.h" #include "scene/resources/material.h" -#include "scene/resources/packed_scene.h" - -#include "modules/gltf/editor/editor_scene_importer_gltf.h" -#include "modules/gltf/gltf_document.h" -#include "modules/gltf/gltf_state.h" +#include "tests/test_macros.h" namespace TestGltf { diff --git a/modules/gltf/tests/test_gltf_images.h b/modules/gltf/tests/test_gltf_images.h index ee912197d65..b82760a64a9 100644 --- a/modules/gltf/tests/test_gltf_images.h +++ b/modules/gltf/tests/test_gltf_images.h @@ -30,13 +30,15 @@ #pragma once -#include "test_gltf.h" - #ifdef TOOLS_ENABLED +#include "test_gltf.h" + #include "editor/file_system/editor_file_system.h" -#include "editor/file_system/editor_paths.h" +#include "editor/inspector/editor_resource_preview.h" #include "scene/main/scene_tree.h" +#include "scene/main/window.h" +#include "scene/resources/3d/primitive_meshes.cpp" #include "scene/resources/image_texture.h" namespace TestGltf { diff --git a/modules/godot_physics_2d/godot_broad_phase_2d.h b/modules/godot_physics_2d/godot_broad_phase_2d.h index 65c99872394..f0502884da6 100644 --- a/modules/godot_physics_2d/godot_broad_phase_2d.h +++ b/modules/godot_physics_2d/godot_broad_phase_2d.h @@ -30,7 +30,6 @@ #pragma once -#include "core/math/math_funcs.h" #include "core/math/rect2.h" class GodotCollisionObject2D; diff --git a/modules/godot_physics_2d/godot_collision_object_2d.cpp b/modules/godot_physics_2d/godot_collision_object_2d.cpp index e26251c571a..d2fbeb64168 100644 --- a/modules/godot_physics_2d/godot_collision_object_2d.cpp +++ b/modules/godot_physics_2d/godot_collision_object_2d.cpp @@ -29,6 +29,7 @@ /**************************************************************************/ #include "godot_collision_object_2d.h" + #include "godot_physics_server_2d.h" #include "godot_space_2d.h" diff --git a/modules/godot_physics_2d/godot_collision_object_2d.h b/modules/godot_physics_2d/godot_collision_object_2d.h index ebeb056f9cc..d1de665bf9b 100644 --- a/modules/godot_physics_2d/godot_collision_object_2d.h +++ b/modules/godot_physics_2d/godot_collision_object_2d.h @@ -34,7 +34,6 @@ #include "godot_shape_2d.h" #include "core/templates/self_list.h" -#include "servers/physics_2d/physics_server_2d.h" class GodotSpace2D; diff --git a/modules/godot_physics_2d/godot_physics_server_2d.cpp b/modules/godot_physics_2d/godot_physics_server_2d.cpp index 666f40d29ff..ba4562280d6 100644 --- a/modules/godot_physics_2d/godot_physics_server_2d.cpp +++ b/modules/godot_physics_2d/godot_physics_server_2d.cpp @@ -34,7 +34,6 @@ #include "godot_broad_phase_2d_bvh.h" #include "godot_collision_solver_2d.h" -#include "core/config/project_settings.h" #include "core/debugger/engine_debugger.h" #include "core/os/os.h" diff --git a/modules/godot_physics_3d/godot_broad_phase_3d.h b/modules/godot_physics_3d/godot_broad_phase_3d.h index 852dde3469c..5f149bc7516 100644 --- a/modules/godot_physics_3d/godot_broad_phase_3d.h +++ b/modules/godot_physics_3d/godot_broad_phase_3d.h @@ -31,7 +31,6 @@ #pragma once #include "core/math/aabb.h" -#include "core/math/math_funcs.h" class GodotCollisionObject3D; diff --git a/modules/godot_physics_3d/godot_collision_object_3d.h b/modules/godot_physics_3d/godot_collision_object_3d.h index d20f941e223..9bd67d79a80 100644 --- a/modules/godot_physics_3d/godot_collision_object_3d.h +++ b/modules/godot_physics_3d/godot_collision_object_3d.h @@ -34,7 +34,6 @@ #include "godot_shape_3d.h" #include "core/templates/self_list.h" -#include "servers/physics_3d/physics_server_3d.h" #ifdef DEBUG_ENABLED #define MAX_OBJECT_DISTANCE 3.1622776601683791e+18 diff --git a/modules/godot_physics_3d/godot_step_3d.cpp b/modules/godot_physics_3d/godot_step_3d.cpp index 7b5afcb9486..f8ddf5e082e 100644 --- a/modules/godot_physics_3d/godot_step_3d.cpp +++ b/modules/godot_physics_3d/godot_step_3d.cpp @@ -30,7 +30,7 @@ #include "godot_step_3d.h" -#include "godot_joint_3d.h" +#include "godot_constraint_3d.h" #include "core/object/worker_thread_pool.h" #include "core/os/os.h" diff --git a/modules/godot_physics_3d/joints/godot_jacobian_entry_3d.h b/modules/godot_physics_3d/joints/godot_jacobian_entry_3d.h index d6218e1924b..3bd7b0d3431 100644 --- a/modules/godot_physics_3d/joints/godot_jacobian_entry_3d.h +++ b/modules/godot_physics_3d/joints/godot_jacobian_entry_3d.h @@ -49,7 +49,8 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ -#include "core/math/transform_3d.h" +#include "core/math/basis.h" +#include "core/math/vector3.h" class GodotJacobianEntry3D { public: diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 651418d5f13..a5ab441f53e 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -43,7 +43,6 @@ #ifndef PHYSICS_3D_DISABLED #include "core/math/convex_hull.h" -#include "scene/resources/3d/box_shape_3d.h" #include "scene/resources/3d/capsule_shape_3d.h" #include "scene/resources/3d/concave_polygon_shape_3d.h" #include "scene/resources/3d/convex_polygon_shape_3d.h" diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h index 62f40e221b7..d4f022c2bf2 100644 --- a/modules/gridmap/grid_map.h +++ b/modules/gridmap/grid_map.h @@ -32,7 +32,6 @@ #include "scene/3d/node_3d.h" #include "scene/resources/3d/mesh_library.h" -#include "scene/resources/multimesh.h" class NavigationMesh; class NavigationMeshSourceGeometryData3D; diff --git a/modules/jolt_physics/jolt_physics_server_3d.cpp b/modules/jolt_physics/jolt_physics_server_3d.cpp index b2a39613ac4..3b68594b275 100644 --- a/modules/jolt_physics/jolt_physics_server_3d.cpp +++ b/modules/jolt_physics/jolt_physics_server_3d.cpp @@ -39,7 +39,6 @@ #include "objects/jolt_area_3d.h" #include "objects/jolt_body_3d.h" #include "objects/jolt_soft_body_3d.h" -#include "servers/physics_3d/physics_server_3d_wrap_mt.h" #include "shapes/jolt_box_shape_3d.h" #include "shapes/jolt_capsule_shape_3d.h" #include "shapes/jolt_concave_polygon_shape_3d.h" diff --git a/modules/jolt_physics/objects/jolt_area_3d.cpp b/modules/jolt_physics/objects/jolt_area_3d.cpp index 3b0b2e88eb2..75c46231653 100644 --- a/modules/jolt_physics/objects/jolt_area_3d.cpp +++ b/modules/jolt_physics/objects/jolt_area_3d.cpp @@ -30,7 +30,6 @@ #include "jolt_area_3d.h" -#include "../jolt_project_settings.h" #include "../misc/jolt_math_funcs.h" #include "../misc/jolt_type_conversions.h" #include "../shapes/jolt_shape_3d.h" diff --git a/modules/jolt_physics/objects/jolt_group_filter.cpp b/modules/jolt_physics/objects/jolt_group_filter.cpp index b06ce8c66b5..272794f3a15 100644 --- a/modules/jolt_physics/objects/jolt_group_filter.cpp +++ b/modules/jolt_physics/objects/jolt_group_filter.cpp @@ -30,8 +30,6 @@ #include "jolt_group_filter.h" -#include "jolt_area_3d.h" -#include "jolt_body_3d.h" #include "jolt_object_3d.h" bool JoltGroupFilter::CanCollide(const JPH::CollisionGroup &p_group1, const JPH::CollisionGroup &p_group2) const { diff --git a/modules/jolt_physics/objects/jolt_object_3d.cpp b/modules/jolt_physics/objects/jolt_object_3d.cpp index b32fee419f9..63d3526ba5f 100644 --- a/modules/jolt_physics/objects/jolt_object_3d.cpp +++ b/modules/jolt_physics/objects/jolt_object_3d.cpp @@ -31,8 +31,6 @@ #include "jolt_object_3d.h" #include "../jolt_physics_server_3d.h" -#include "../jolt_project_settings.h" -#include "../spaces/jolt_layers.h" #include "../spaces/jolt_space_3d.h" #include "jolt_group_filter.h" diff --git a/modules/jolt_physics/objects/jolt_object_3d.h b/modules/jolt_physics/objects/jolt_object_3d.h index fcbef1db9e6..ba4f8c21f75 100644 --- a/modules/jolt_physics/objects/jolt_object_3d.h +++ b/modules/jolt_physics/objects/jolt_object_3d.h @@ -35,7 +35,6 @@ #include "core/math/vector3.h" #include "core/object/object.h" #include "core/string/ustring.h" -#include "core/templates/local_vector.h" #include "core/templates/rid.h" #include "Jolt/Jolt.h" diff --git a/modules/jolt_physics/objects/jolt_shaped_object_3d.cpp b/modules/jolt_physics/objects/jolt_shaped_object_3d.cpp index 83ac84ce90b..296281b7274 100644 --- a/modules/jolt_physics/objects/jolt_shaped_object_3d.cpp +++ b/modules/jolt_physics/objects/jolt_shaped_object_3d.cpp @@ -32,7 +32,6 @@ #include "../misc/jolt_math_funcs.h" #include "../misc/jolt_type_conversions.h" -#include "../shapes/jolt_custom_double_sided_shape.h" #include "../shapes/jolt_shape_3d.h" #include "../spaces/jolt_space_3d.h" diff --git a/modules/jolt_physics/shapes/jolt_custom_decorated_shape.h b/modules/jolt_physics/shapes/jolt_custom_decorated_shape.h index b22ae82d183..e11b2b6d739 100644 --- a/modules/jolt_physics/shapes/jolt_custom_decorated_shape.h +++ b/modules/jolt_physics/shapes/jolt_custom_decorated_shape.h @@ -30,8 +30,6 @@ #pragma once -#include "jolt_custom_shape_type.h" - #include "Jolt/Jolt.h" #include "Jolt/Physics/Collision/Shape/DecoratedShape.h" diff --git a/modules/jolt_physics/shapes/jolt_custom_double_sided_shape.cpp b/modules/jolt_physics/shapes/jolt_custom_double_sided_shape.cpp index ef24d886cca..de03936d53d 100644 --- a/modules/jolt_physics/shapes/jolt_custom_double_sided_shape.cpp +++ b/modules/jolt_physics/shapes/jolt_custom_double_sided_shape.cpp @@ -30,8 +30,6 @@ #include "jolt_custom_double_sided_shape.h" -#include "../jolt_project_settings.h" - #include "core/error/error_macros.h" #include "Jolt/Physics/Collision/CollisionDispatch.h" diff --git a/modules/jolt_physics/shapes/jolt_custom_ray_shape.cpp b/modules/jolt_physics/shapes/jolt_custom_ray_shape.cpp index c00e43b4858..7b4d24bb73c 100644 --- a/modules/jolt_physics/shapes/jolt_custom_ray_shape.cpp +++ b/modules/jolt_physics/shapes/jolt_custom_ray_shape.cpp @@ -32,6 +32,8 @@ #include "../spaces/jolt_query_collectors.h" +#include "core/error/error_macros.h" + #include "Jolt/Physics/Collision/CastResult.h" #include "Jolt/Physics/Collision/RayCast.h" #include "Jolt/Physics/Collision/TransformedShape.h" diff --git a/modules/jolt_physics/spaces/jolt_contact_listener_3d.h b/modules/jolt_physics/spaces/jolt_contact_listener_3d.h index f1b1a345e14..cf4bbdd65b1 100644 --- a/modules/jolt_physics/spaces/jolt_contact_listener_3d.h +++ b/modules/jolt_physics/spaces/jolt_contact_listener_3d.h @@ -35,7 +35,6 @@ #include "core/templates/hash_set.h" #include "core/templates/hashfuncs.h" #include "core/templates/local_vector.h" -#include "core/templates/safe_refcount.h" #include "core/variant/variant.h" #include "Jolt/Jolt.h" @@ -44,8 +43,6 @@ #include "Jolt/Physics/Collision/ContactListener.h" #include "Jolt/Physics/SoftBody/SoftBodyContactListener.h" -#include - class JoltArea3D; class JoltBody3D; class JoltShapedObject3D; diff --git a/modules/jolt_physics/spaces/jolt_job_system.cpp b/modules/jolt_physics/spaces/jolt_job_system.cpp index 73da9aa1ae3..49a37df441e 100644 --- a/modules/jolt_physics/spaces/jolt_job_system.cpp +++ b/modules/jolt_physics/spaces/jolt_job_system.cpp @@ -30,8 +30,6 @@ #include "jolt_job_system.h" -#include "../jolt_project_settings.h" - #include "core/debugger/engine_debugger.h" #include "core/object/worker_thread_pool.h" #include "core/os/os.h" diff --git a/modules/jolt_physics/spaces/jolt_layers.cpp b/modules/jolt_physics/spaces/jolt_layers.cpp index 14c3afff1dd..324d1c41044 100644 --- a/modules/jolt_physics/spaces/jolt_layers.cpp +++ b/modules/jolt_physics/spaces/jolt_layers.cpp @@ -30,7 +30,6 @@ #include "jolt_layers.h" -#include "../jolt_project_settings.h" #include "jolt_broad_phase_layer.h" #include "core/error/error_macros.h" diff --git a/modules/jolt_physics/spaces/jolt_motion_filter_3d.cpp b/modules/jolt_physics/spaces/jolt_motion_filter_3d.cpp index db60046f228..804a627e739 100644 --- a/modules/jolt_physics/spaces/jolt_motion_filter_3d.cpp +++ b/modules/jolt_physics/spaces/jolt_motion_filter_3d.cpp @@ -35,7 +35,6 @@ #include "../shapes/jolt_custom_motion_shape.h" #include "../shapes/jolt_custom_ray_shape.h" #include "../shapes/jolt_custom_shape_type.h" -#include "../shapes/jolt_shape_3d.h" #include "jolt_broad_phase_layer.h" #include "jolt_space_3d.h" diff --git a/modules/jolt_physics/spaces/jolt_query_collectors.h b/modules/jolt_physics/spaces/jolt_query_collectors.h index 10fa1d20f03..936c6fe5641 100644 --- a/modules/jolt_physics/spaces/jolt_query_collectors.h +++ b/modules/jolt_physics/spaces/jolt_query_collectors.h @@ -30,9 +30,6 @@ #pragma once -#include "../jolt_project_settings.h" -#include "jolt_space_3d.h" - #include "Jolt/Jolt.h" #include "Jolt/Core/STLLocalAllocator.h" diff --git a/modules/jolt_physics/spaces/jolt_space_3d.cpp b/modules/jolt_physics/spaces/jolt_space_3d.cpp index 833287fce35..a6546436d36 100644 --- a/modules/jolt_physics/spaces/jolt_space_3d.cpp +++ b/modules/jolt_physics/spaces/jolt_space_3d.cpp @@ -36,7 +36,6 @@ #include "../misc/jolt_stream_wrappers.h" #include "../objects/jolt_area_3d.h" #include "../objects/jolt_body_3d.h" -#include "../shapes/jolt_custom_shape_type.h" #include "../shapes/jolt_shape_3d.h" #include "jolt_body_activation_listener_3d.h" #include "jolt_contact_listener_3d.h" diff --git a/modules/ktx/texture_loader_ktx.cpp b/modules/ktx/texture_loader_ktx.cpp index a6966159117..83eb4f1b2db 100644 --- a/modules/ktx/texture_loader_ktx.cpp +++ b/modules/ktx/texture_loader_ktx.cpp @@ -34,7 +34,6 @@ #include "core/io/file_access_memory.h" #include "core/object/class_db.h" #include "scene/resources/image_texture.h" -#include "scene/resources/texture.h" #include "servers/rendering/rendering_server.h" #include diff --git a/modules/lightmapper_rd/lightmapper_rd.h b/modules/lightmapper_rd/lightmapper_rd.h index ae79dace31f..d4e6ed5b675 100644 --- a/modules/lightmapper_rd/lightmapper_rd.h +++ b/modules/lightmapper_rd/lightmapper_rd.h @@ -32,7 +32,6 @@ #include "core/templates/local_vector.h" #include "scene/3d/lightmapper.h" -#include "scene/resources/mesh.h" class RenderingDevice; class RDShaderFile; diff --git a/modules/mbedtls/tests/test_crypto_mbedtls.h b/modules/mbedtls/tests/test_crypto_mbedtls.h index c171a25be17..7d9e7949e52 100644 --- a/modules/mbedtls/tests/test_crypto_mbedtls.h +++ b/modules/mbedtls/tests/test_crypto_mbedtls.h @@ -30,7 +30,6 @@ #pragma once -#include "core/crypto/crypto.h" #include "core/crypto/hashing_context.h" #include "tests/test_macros.h" diff --git a/modules/modules_builders.py b/modules/modules_builders.py index 5cb365cf4b2..7823984e0a7 100644 --- a/modules/modules_builders.py +++ b/modules/modules_builders.py @@ -36,7 +36,9 @@ def register_module_types_builder(target, source, env): #include "modules/modules_enabled.gen.h" +// IWYU pragma: begin_keep. {mod_inc} +// IWYU pragma: end_keep. void initialize_modules(ModuleInitializationLevel p_level) {{ {mod_init} @@ -52,5 +54,7 @@ void uninitialize_modules(ModuleInitializationLevel p_level) {{ def modules_tests_builder(target, source, env): headers = sorted([os.path.relpath(src.path, methods.base_folder).replace("\\", "/") for src in source]) with methods.generated_wrapper(str(target[0])) as file: + file.write("// IWYU pragma: begin_keep.\n") for header in headers: file.write(f'#include "{header}"\n') + file.write("// IWYU pragma: end_keep.\n") diff --git a/modules/mono/class_db_api_json.cpp b/modules/mono/class_db_api_json.cpp index 68d3f150f24..b0acf6659ed 100644 --- a/modules/mono/class_db_api_json.cpp +++ b/modules/mono/class_db_api_json.cpp @@ -35,7 +35,6 @@ #include "core/config/project_settings.h" #include "core/io/file_access.h" #include "core/io/json.h" -#include "core/version.h" void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Dictionary classes_dict; diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 37cc04aae6a..e4dad17f6bf 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -30,15 +30,19 @@ #include "csharp_script.h" +#include "godotsharp_defs.h" #include "godotsharp_dirs.h" -#include "managed_callable.h" #include "mono_gd/gd_mono_cache.h" #include "signal_awaiter_utils.h" #include "utils/macros.h" #include "utils/naming_utils.h" -#include "utils/path_utils.h" #include "utils/string_utils.h" +#ifdef GD_MONO_HOT_RELOAD +#include "managed_callable.h" +#include "utils/path_utils.h" +#endif + #ifdef DEBUG_ENABLED #include "class_db_api_json.h" #endif // DEBUG_ENABLED @@ -61,11 +65,14 @@ #ifdef TOOLS_ENABLED #include "core/os/keyboard.h" -#include "editor/docks/inspector_dock.h" -#include "editor/docks/signals_dock.h" #include "editor/editor_node.h" #include "editor/file_system/editor_file_system.h" #include "editor/settings/editor_settings.h" + +#ifdef GD_MONO_HOT_RELOAD +#include "editor/docks/inspector_dock.h" +#include "editor/docks/signals_dock.h" +#endif #endif // Types that will be skipped over (in favor of their base types) when setting up instance bindings. diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 6e67b1dc4fc..884eb53fa36 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -39,7 +39,6 @@ #include "core/config/engine.h" #include "core/core_constants.h" -#include "core/io/compression.h" #include "core/io/dir_access.h" #include "core/io/file_access.h" #include "core/os/os.h" diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp index 097c69ad9c3..c3c2ba24bd4 100644 --- a/modules/mono/editor/editor_internal_calls.cpp +++ b/modules/mono/editor/editor_internal_calls.cpp @@ -30,15 +30,20 @@ #include "editor_internal_calls.h" -#include "../csharp_script.h" #include "../godotsharp_dirs.h" #include "../interop_types.h" -#include "../utils/macos_utils.h" #include "../utils/path_utils.h" #include "code_completion.h" +#ifdef GD_MONO_HOT_RELOAD +#include "../csharp_script.h" +#endif + +#ifdef MACOS_ENABLED +#include "../utils/macos_utils.h" +#endif + #include "core/config/project_settings.h" -#include "core/object/callable_mp.h" #include "core/os/os.h" #include "core/version.h" #include "editor/debugger/editor_debugger_node.h" @@ -52,6 +57,10 @@ #include "editor/themes/editor_scale.h" #include "main/main.h" +#ifdef GD_MONO_HOT_RELOAD +#include "core/object/callable_mp.h" +#endif + #ifdef UNIX_ENABLED #include // access #endif diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index b1f52e15306..e45e20794a1 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -35,17 +35,18 @@ #include "../managed_callable.h" #include "../mono_gd/gd_mono_cache.h" #include "../signal_awaiter_utils.h" -#include "../utils/path_utils.h" #include "core/config/engine.h" #include "core/config/project_settings.h" #include "core/debugger/engine_debugger.h" #include "core/debugger/script_debugger.h" +#include "core/io/compression.h" #include "core/io/marshalls.h" #include "core/object/class_db.h" #include "core/object/method_bind.h" #include "core/os/os.h" #include "core/string/string_name.h" +#include "core/variant/variant_parser.h" #ifdef TOOLS_ENABLED #include "editor/file_system/editor_file_system.h" diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp index 7477533000d..12aa9b453de 100644 --- a/modules/mono/godotsharp_dirs.cpp +++ b/modules/mono/godotsharp_dirs.cpp @@ -31,18 +31,26 @@ #include "godotsharp_dirs.h" #include "mono_gd/gd_mono.h" -#include "utils/path_utils.h" -#include "core/config/engine.h" +#ifndef TOOLS_ENABLED +#include "utils/path_utils.h" +#endif + #include "core/config/project_settings.h" #include "core/io/dir_access.h" #include "core/os/os.h" #ifdef TOOLS_ENABLED -#include "core/version.h" #include "editor/file_system/editor_paths.h" #endif +#ifndef TOOLS_ENABLED +#include "core/config/engine.h" +#ifndef ANDROID_ENABLED +#include "core/io/file_access.h" +#endif +#endif + namespace GodotSharpDirs { String _get_expected_build_config() { diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index 380c26bd1da..0e90537a9a6 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -32,10 +32,13 @@ #include "mono_gc_handle.h" +#include "core/variant/callable.h" + +#ifdef GD_MONO_HOT_RELOAD #include "core/os/mutex.h" #include "core/templates/rb_map.h" #include "core/templates/self_list.h" -#include "core/variant/callable.h" +#endif class ManagedCallable : public CallableCustom { friend class CSharpLanguage; diff --git a/modules/mono/mono_gc_handle.h b/modules/mono/mono_gc_handle.h index 014b190e6cd..8ee609fa1e8 100644 --- a/modules/mono/mono_gc_handle.h +++ b/modules/mono/mono_gc_handle.h @@ -30,7 +30,11 @@ #pragma once -#include "core/object/ref_counted.h" +#include "core/typedefs.h" + +#ifdef DEBUG_ENABLED +#include "core/error/error_macros.h" +#endif namespace gdmono { diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp index 8543ab3722a..8805ab6f0a4 100644 --- a/modules/mono/mono_gd/gd_mono.cpp +++ b/modules/mono/mono_gd/gd_mono.cpp @@ -30,7 +30,6 @@ #include "gd_mono.h" -#include "../csharp_script.h" #include "../glue/runtime_interop.h" #include "../godotsharp_dirs.h" #include "../thirdparty/coreclr_delegates.h" @@ -49,7 +48,6 @@ #include "core/config/engine.h" #include "core/config/project_settings.h" -#include "core/debugger/engine_debugger.h" #include "core/io/dir_access.h" #include "core/io/file_access.h" #include "core/os/os.h" diff --git a/modules/mono/mono_gd/gd_mono.h b/modules/mono/mono_gd/gd_mono.h index 0a9f43b4ebe..b03ca49960e 100644 --- a/modules/mono/mono_gd/gd_mono.h +++ b/modules/mono/mono_gd/gd_mono.h @@ -30,9 +30,10 @@ #pragma once -#include "../godotsharp_defs.h" +#include "core/object/object.h" +#include "core/string/ustring.h" -#include "core/io/config_file.h" +#include #ifndef GD_CLR_STDCALL #ifdef WIN32 diff --git a/modules/mono/register_types.cpp b/modules/mono/register_types.cpp index ef23d222c43..b666563a985 100644 --- a/modules/mono/register_types.cpp +++ b/modules/mono/register_types.cpp @@ -32,7 +32,6 @@ #include "csharp_script.h" -#include "core/config/engine.h" #include "core/object/class_db.h" CSharpLanguage *script_language_cs = nullptr; diff --git a/modules/mono/signal_awaiter_utils.h b/modules/mono/signal_awaiter_utils.h index 1354c3a4629..018fe16df5b 100644 --- a/modules/mono/signal_awaiter_utils.h +++ b/modules/mono/signal_awaiter_utils.h @@ -30,10 +30,12 @@ #pragma once -#include "csharp_script.h" #include "mono_gc_handle.h" -#include "core/object/ref_counted.h" +#include "core/object/object_id.h" +#include "core/string/string_name.h" +#include "core/string/ustring.h" +#include "core/variant/callable.h" Error gd_mono_connect_signal_awaiter(Object *p_source, const StringName &p_signal, Object *p_target, GCHandleIntPtr p_awaiter_handle_ptr); diff --git a/modules/mono/utils/path_utils.cpp b/modules/mono/utils/path_utils.cpp index 3052f0b0d5a..47a1388373e 100644 --- a/modules/mono/utils/path_utils.cpp +++ b/modules/mono/utils/path_utils.cpp @@ -31,7 +31,6 @@ #include "path_utils.h" #include "core/config/project_settings.h" -#include "core/io/dir_access.h" #include "core/io/file_access.h" #include "core/os/os.h" @@ -43,7 +42,6 @@ #define ENV_PATH_SEP ";" #else #include -#include #define ENV_PATH_SEP ":" #endif diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp index e679abc956d..c9c3f8db612 100644 --- a/modules/mono/utils/string_utils.cpp +++ b/modules/mono/utils/string_utils.cpp @@ -33,7 +33,6 @@ #include "core/io/file_access.h" #include -#include namespace { diff --git a/modules/mono/utils/string_utils.h b/modules/mono/utils/string_utils.h index a0d7d044d53..482ad23548e 100644 --- a/modules/mono/utils/string_utils.h +++ b/modules/mono/utils/string_utils.h @@ -31,7 +31,6 @@ #pragma once #include "core/string/ustring.h" -#include "core/variant/variant.h" #include diff --git a/modules/mp3/register_types.cpp b/modules/mp3/register_types.cpp index 59220995d03..fc84fb46dbc 100644 --- a/modules/mp3/register_types.cpp +++ b/modules/mp3/register_types.cpp @@ -35,7 +35,6 @@ #include "core/object/class_db.h" #ifdef TOOLS_ENABLED -#include "core/config/engine.h" #include "editor/editor_node.h" #include "resource_importer_mp3.h" diff --git a/modules/mp3/resource_importer_mp3.cpp b/modules/mp3/resource_importer_mp3.cpp index 00e25f5a65a..36ea6ca3176 100644 --- a/modules/mp3/resource_importer_mp3.cpp +++ b/modules/mp3/resource_importer_mp3.cpp @@ -30,7 +30,8 @@ #include "resource_importer_mp3.h" -#include "core/io/file_access.h" +#include "audio_stream_mp3.h" + #include "core/io/resource_saver.h" #ifdef TOOLS_ENABLED diff --git a/modules/mp3/resource_importer_mp3.h b/modules/mp3/resource_importer_mp3.h index 8a8b78095c0..bec3e095c0d 100644 --- a/modules/mp3/resource_importer_mp3.h +++ b/modules/mp3/resource_importer_mp3.h @@ -30,8 +30,6 @@ #pragma once -#include "audio_stream_mp3.h" - #include "core/io/resource_importer.h" class ResourceImporterMP3 : public ResourceImporter { diff --git a/modules/multiplayer/editor/editor_network_profiler.cpp b/modules/multiplayer/editor/editor_network_profiler.cpp index 170946263d5..dc8612d731e 100644 --- a/modules/multiplayer/editor/editor_network_profiler.cpp +++ b/modules/multiplayer/editor/editor_network_profiler.cpp @@ -32,7 +32,7 @@ #include "core/io/resource_loader.h" #include "core/object/callable_mp.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `ADD_SIGNAL` macro. #include "editor/editor_string_names.h" #include "editor/run/editor_run_bar.h" #include "editor/settings/editor_settings.h" @@ -40,6 +40,7 @@ #include "scene/gui/check_box.h" #include "scene/gui/flow_container.h" #include "scene/gui/line_edit.h" +#include "scene/gui/split_container.h" #include "scene/main/timer.h" void EditorNetworkProfiler::_bind_methods() { diff --git a/modules/multiplayer/editor/editor_network_profiler.h b/modules/multiplayer/editor/editor_network_profiler.h index 2bbe3fc7fca..241b726b62e 100644 --- a/modules/multiplayer/editor/editor_network_profiler.h +++ b/modules/multiplayer/editor/editor_network_profiler.h @@ -36,7 +36,6 @@ #include "scene/gui/box_container.h" #include "scene/gui/button.h" #include "scene/gui/label.h" -#include "scene/gui/split_container.h" #include "scene/gui/tree.h" class Timer; diff --git a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp index 1dbb5aea166..fcc68d3c440 100644 --- a/modules/multiplayer/editor/multiplayer_editor_plugin.cpp +++ b/modules/multiplayer/editor/multiplayer_editor_plugin.cpp @@ -35,7 +35,7 @@ #include "replication_editor.h" #include "core/object/callable_mp.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `ADD_SIGNAL` macro. #include "editor/docks/editor_dock_manager.h" #include "editor/editor_interface.h" #include "editor/editor_node.h" diff --git a/modules/multiplayer/tests/test_multiplayer_spawner.h b/modules/multiplayer/tests/test_multiplayer_spawner.h index 62894c42b2f..0692a8677e0 100644 --- a/modules/multiplayer/tests/test_multiplayer_spawner.h +++ b/modules/multiplayer/tests/test_multiplayer_spawner.h @@ -32,6 +32,7 @@ #include "core/object/class_db.h" #include "scene/main/scene_tree.h" +#include "scene/main/window.h" #include "tests/test_macros.h" #include "tests/test_utils.h" diff --git a/modules/multiplayer/tests/test_scene_multiplayer.h b/modules/multiplayer/tests/test_scene_multiplayer.h index abac7b2989a..06617b349f2 100644 --- a/modules/multiplayer/tests/test_scene_multiplayer.h +++ b/modules/multiplayer/tests/test_scene_multiplayer.h @@ -31,8 +31,10 @@ #pragma once #include "core/object/callable_mp.h" +#include "core/os/os.h" #include "scene/2d/node_2d.h" #include "scene/main/scene_tree.h" +#include "tests/signal_watcher.h" #include "tests/test_macros.h" #include "tests/test_utils.h" diff --git a/modules/navigation_2d/2d/nav_map_builder_2d.cpp b/modules/navigation_2d/2d/nav_map_builder_2d.cpp index 1fbc82aa593..65532c0542f 100644 --- a/modules/navigation_2d/2d/nav_map_builder_2d.cpp +++ b/modules/navigation_2d/2d/nav_map_builder_2d.cpp @@ -31,8 +31,6 @@ #include "nav_map_builder_2d.h" #include "../nav_link_2d.h" -#include "../nav_map_2d.h" -#include "../nav_region_2d.h" #include "../triangle2.h" #include "nav_map_iteration_2d.h" #include "nav_region_iteration_2d.h" diff --git a/modules/navigation_2d/2d/nav_map_iteration_2d.h b/modules/navigation_2d/2d/nav_map_iteration_2d.h index f937c2db586..dd0fe803db4 100644 --- a/modules/navigation_2d/2d/nav_map_iteration_2d.h +++ b/modules/navigation_2d/2d/nav_map_iteration_2d.h @@ -30,7 +30,6 @@ #pragma once -#include "../nav_rid_2d.h" #include "../nav_utils_2d.h" #include "nav_mesh_queries_2d.h" diff --git a/modules/navigation_2d/2d/nav_mesh_generator_2d.h b/modules/navigation_2d/2d/nav_mesh_generator_2d.h index 9b93c6816d0..17df0397607 100644 --- a/modules/navigation_2d/2d/nav_mesh_generator_2d.h +++ b/modules/navigation_2d/2d/nav_mesh_generator_2d.h @@ -34,7 +34,6 @@ #include "core/object/object.h" #include "core/object/worker_thread_pool.h" -#include "core/templates/rid_owner.h" #include "servers/navigation_2d/navigation_server_2d.h" class Node; diff --git a/modules/navigation_2d/2d/nav_region_builder_2d.cpp b/modules/navigation_2d/2d/nav_region_builder_2d.cpp index 7973762d30e..d0cabb55581 100644 --- a/modules/navigation_2d/2d/nav_region_builder_2d.cpp +++ b/modules/navigation_2d/2d/nav_region_builder_2d.cpp @@ -30,8 +30,6 @@ #include "nav_region_builder_2d.h" -#include "../nav_map_2d.h" -#include "../nav_region_2d.h" #include "../triangle2.h" #include "nav_region_iteration_2d.h" diff --git a/modules/navigation_2d/2d/nav_region_iteration_2d.h b/modules/navigation_2d/2d/nav_region_iteration_2d.h index 329f4a673cb..a6cfcb121e8 100644 --- a/modules/navigation_2d/2d/nav_region_iteration_2d.h +++ b/modules/navigation_2d/2d/nav_region_iteration_2d.h @@ -32,7 +32,6 @@ #include "../nav_utils_2d.h" #include "nav_base_iteration_2d.h" -#include "scene/resources/2d/navigation_polygon.h" #include "core/math/rect2.h" diff --git a/modules/navigation_2d/nav_base_2d.h b/modules/navigation_2d/nav_base_2d.h index 1380a49b55e..406ad2318d8 100644 --- a/modules/navigation_2d/nav_base_2d.h +++ b/modules/navigation_2d/nav_base_2d.h @@ -31,8 +31,8 @@ #pragma once #include "nav_rid_2d.h" -#include "nav_utils_2d.h" +#include "core/object/object_id.h" #include "servers/navigation_2d/navigation_constants_2d.h" class NavMap2D; diff --git a/modules/navigation_2d/nav_utils_2d.h b/modules/navigation_2d/nav_utils_2d.h index c45ef2b0aec..7d22551de23 100644 --- a/modules/navigation_2d/nav_utils_2d.h +++ b/modules/navigation_2d/nav_utils_2d.h @@ -30,12 +30,10 @@ #pragma once -#include "core/math/vector3.h" -#include "core/object/ref_counted.h" -#include "core/templates/hash_map.h" +#include "core/math/vector2.h" #include "core/templates/hashfuncs.h" #include "core/templates/local_vector.h" -#include "servers/navigation_2d/navigation_constants_2d.h" +#include "core/templates/rid.h" #include // FLT_MAX diff --git a/modules/navigation_2d/register_types.cpp b/modules/navigation_2d/register_types.cpp index 25bc3fe4437..ac2cf432caf 100644 --- a/modules/navigation_2d/register_types.cpp +++ b/modules/navigation_2d/register_types.cpp @@ -32,7 +32,6 @@ #include "2d/godot_navigation_server_2d.h" -#include "core/config/engine.h" #include "core/object/callable_mp.h" #include "servers/navigation_2d/navigation_server_2d.h" diff --git a/modules/navigation_3d/3d/nav_map_builder_3d.cpp b/modules/navigation_3d/3d/nav_map_builder_3d.cpp index cbe5e8377ff..47964db5390 100644 --- a/modules/navigation_3d/3d/nav_map_builder_3d.cpp +++ b/modules/navigation_3d/3d/nav_map_builder_3d.cpp @@ -31,8 +31,6 @@ #include "nav_map_builder_3d.h" #include "../nav_link_3d.h" -#include "../nav_map_3d.h" -#include "../nav_region_3d.h" #include "nav_map_iteration_3d.h" #include "nav_region_iteration_3d.h" diff --git a/modules/navigation_3d/3d/nav_map_iteration_3d.h b/modules/navigation_3d/3d/nav_map_iteration_3d.h index f8402153303..008ad091b12 100644 --- a/modules/navigation_3d/3d/nav_map_iteration_3d.h +++ b/modules/navigation_3d/3d/nav_map_iteration_3d.h @@ -30,7 +30,6 @@ #pragma once -#include "../nav_rid_3d.h" #include "../nav_utils_3d.h" #include "nav_mesh_queries_3d.h" diff --git a/modules/navigation_3d/3d/nav_mesh_generator_3d.h b/modules/navigation_3d/3d/nav_mesh_generator_3d.h index 7d6154ff7de..47570ea17f8 100644 --- a/modules/navigation_3d/3d/nav_mesh_generator_3d.h +++ b/modules/navigation_3d/3d/nav_mesh_generator_3d.h @@ -32,7 +32,6 @@ #include "core/object/object.h" #include "core/object/worker_thread_pool.h" -#include "core/templates/rid_owner.h" #include "servers/navigation_3d/navigation_server_3d.h" class Node; diff --git a/modules/navigation_3d/3d/nav_region_builder_3d.cpp b/modules/navigation_3d/3d/nav_region_builder_3d.cpp index bcc91bcc569..33dd8d2c9a8 100644 --- a/modules/navigation_3d/3d/nav_region_builder_3d.cpp +++ b/modules/navigation_3d/3d/nav_region_builder_3d.cpp @@ -30,8 +30,6 @@ #include "nav_region_builder_3d.h" -#include "../nav_map_3d.h" -#include "../nav_region_3d.h" #include "nav_region_iteration_3d.h" #include "core/config/project_settings.h" diff --git a/modules/navigation_3d/3d/nav_region_iteration_3d.h b/modules/navigation_3d/3d/nav_region_iteration_3d.h index 8c0ed392d69..cef7edf6173 100644 --- a/modules/navigation_3d/3d/nav_region_iteration_3d.h +++ b/modules/navigation_3d/3d/nav_region_iteration_3d.h @@ -32,7 +32,6 @@ #include "../nav_utils_3d.h" #include "nav_base_iteration_3d.h" -#include "scene/resources/navigation_mesh.h" #include "core/math/aabb.h" diff --git a/modules/navigation_3d/3d/navigation_mesh_generator.cpp b/modules/navigation_3d/3d/navigation_mesh_generator.cpp index 424d2cc7a16..21024f41162 100644 --- a/modules/navigation_3d/3d/navigation_mesh_generator.cpp +++ b/modules/navigation_3d/3d/navigation_mesh_generator.cpp @@ -31,6 +31,7 @@ #include "navigation_mesh_generator.h" #include "core/object/class_db.h" +#include "scene/main/node.h" #include "scene/resources/3d/navigation_mesh_source_geometry_data_3d.h" #include "servers/navigation_3d/navigation_server_3d.h" diff --git a/modules/navigation_3d/3d/navigation_mesh_generator.h b/modules/navigation_3d/3d/navigation_mesh_generator.h index eaf2221a28d..22b0a5f6915 100644 --- a/modules/navigation_3d/3d/navigation_mesh_generator.h +++ b/modules/navigation_3d/3d/navigation_mesh_generator.h @@ -30,7 +30,6 @@ #pragma once -#include "scene/3d/navigation/navigation_region_3d.h" #include "scene/resources/navigation_mesh.h" class NavigationMeshSourceGeometryData3D; diff --git a/modules/navigation_3d/nav_base_3d.h b/modules/navigation_3d/nav_base_3d.h index 08934362623..03c8aeaa417 100644 --- a/modules/navigation_3d/nav_base_3d.h +++ b/modules/navigation_3d/nav_base_3d.h @@ -31,8 +31,8 @@ #pragma once #include "nav_rid_3d.h" -#include "nav_utils_3d.h" +#include "core/object/object_id.h" #include "servers/navigation_3d/navigation_constants_3d.h" class NavMap3D; diff --git a/modules/navigation_3d/nav_utils_3d.h b/modules/navigation_3d/nav_utils_3d.h index 5b8b4aff876..62e5aeed69c 100644 --- a/modules/navigation_3d/nav_utils_3d.h +++ b/modules/navigation_3d/nav_utils_3d.h @@ -31,11 +31,9 @@ #pragma once #include "core/math/vector3.h" -#include "core/object/ref_counted.h" -#include "core/templates/hash_map.h" #include "core/templates/hashfuncs.h" #include "core/templates/local_vector.h" -#include "servers/navigation_3d/navigation_constants_3d.h" +#include "core/templates/rid.h" #include // FLT_MAX diff --git a/modules/noise/tests/test_noise_texture_2d.h b/modules/noise/tests/test_noise_texture_2d.h index 4b909176181..6d6686a0729 100644 --- a/modules/noise/tests/test_noise_texture_2d.h +++ b/modules/noise/tests/test_noise_texture_2d.h @@ -30,9 +30,11 @@ #pragma once +#include "../fastnoise_lite.h" #include "../noise_texture_2d.h" #include "core/object/callable_mp.h" +#include "core/object/message_queue.h" #include "tests/test_macros.h" namespace TestNoiseTexture2D { diff --git a/modules/noise/tests/test_noise_texture_3d.h b/modules/noise/tests/test_noise_texture_3d.h index a6eeb1e382e..6bb78d92f15 100644 --- a/modules/noise/tests/test_noise_texture_3d.h +++ b/modules/noise/tests/test_noise_texture_3d.h @@ -30,9 +30,11 @@ #pragma once +#include "../fastnoise_lite.h" #include "../noise_texture_3d.h" #include "core/object/callable_mp.h" +#include "core/object/message_queue.h" #include "tests/test_macros.h" namespace TestNoiseTexture3D { diff --git a/modules/objectdb_profiler/snapshot_collector.cpp b/modules/objectdb_profiler/snapshot_collector.cpp index 73234152bd5..13ded9c7535 100644 --- a/modules/objectdb_profiler/snapshot_collector.cpp +++ b/modules/objectdb_profiler/snapshot_collector.cpp @@ -37,7 +37,7 @@ #include "core/version.h" #include "scene/main/node.h" #include "scene/main/scene_tree.h" -#include "scene/main/window.h" +#include "scene/main/window.h" // IWYU pragma: keep. Used via `get_root()`. void SnapshotCollector::initialize() { pending_snapshots.clear(); diff --git a/modules/objectdb_profiler/snapshot_collector.h b/modules/objectdb_profiler/snapshot_collector.h index a6e12b994c4..c2cec61272d 100644 --- a/modules/objectdb_profiler/snapshot_collector.h +++ b/modules/objectdb_profiler/snapshot_collector.h @@ -34,8 +34,7 @@ #include "scene/debugger/scene_debugger_object.h" struct SnapshotDataTransportObject : public SceneDebuggerObject { - SnapshotDataTransportObject() : - SceneDebuggerObject() {} + SnapshotDataTransportObject() {} SnapshotDataTransportObject(Object *p_obj) : SceneDebuggerObject(p_obj) {} diff --git a/modules/openxr/action_map/openxr_action_map.cpp b/modules/openxr/action_map/openxr_action_map.cpp index 6aab0d472f8..5bfec55669e 100644 --- a/modules/openxr/action_map/openxr_action_map.cpp +++ b/modules/openxr/action_map/openxr_action_map.cpp @@ -30,6 +30,8 @@ #include "openxr_action_map.h" +#include "openxr_interaction_profile_metadata.h" + #include "core/object/class_db.h" void OpenXRActionMap::_bind_methods() { diff --git a/modules/openxr/action_map/openxr_binding_modifier.cpp b/modules/openxr/action_map/openxr_binding_modifier.cpp index 41d2ee98603..661fc100d41 100644 --- a/modules/openxr/action_map/openxr_binding_modifier.cpp +++ b/modules/openxr/action_map/openxr_binding_modifier.cpp @@ -30,7 +30,7 @@ #include "openxr_binding_modifier.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `GDVIRTUAL_BIND` macro. void OpenXRBindingModifier::_bind_methods() { GDVIRTUAL_BIND(_get_description); diff --git a/modules/openxr/action_map/openxr_binding_modifier.h b/modules/openxr/action_map/openxr_binding_modifier.h index 29298c23e9f..ef45d3e5f7f 100644 --- a/modules/openxr/action_map/openxr_binding_modifier.h +++ b/modules/openxr/action_map/openxr_binding_modifier.h @@ -30,7 +30,6 @@ #pragma once -#include "../action_map/openxr_action.h" #include "core/io/resource.h" // Part of implementation for: diff --git a/modules/openxr/action_map/openxr_interaction_profile.cpp b/modules/openxr/action_map/openxr_interaction_profile.cpp index e6ffde40de7..8a091c834da 100644 --- a/modules/openxr/action_map/openxr_interaction_profile.cpp +++ b/modules/openxr/action_map/openxr_interaction_profile.cpp @@ -30,6 +30,8 @@ #include "openxr_interaction_profile.h" +#include "openxr_interaction_profile_metadata.h" + #include "core/object/class_db.h" void OpenXRIPBinding::_bind_methods() { diff --git a/modules/openxr/action_map/openxr_interaction_profile.h b/modules/openxr/action_map/openxr_interaction_profile.h index bfb192bdfe2..119191da0eb 100644 --- a/modules/openxr/action_map/openxr_interaction_profile.h +++ b/modules/openxr/action_map/openxr_interaction_profile.h @@ -32,7 +32,6 @@ #include "openxr_action.h" #include "openxr_binding_modifier.h" -#include "openxr_interaction_profile_metadata.h" #include "core/io/resource.h" diff --git a/modules/openxr/editor/openxr_action_editor.h b/modules/openxr/editor/openxr_action_editor.h index 6c1d0d5aa71..bec4dc45893 100644 --- a/modules/openxr/editor/openxr_action_editor.h +++ b/modules/openxr/editor/openxr_action_editor.h @@ -37,7 +37,6 @@ #include "scene/gui/button.h" #include "scene/gui/line_edit.h" #include "scene/gui/option_button.h" -#include "scene/gui/text_edit.h" class OpenXRActionEditor : public HBoxContainer { GDCLASS(OpenXRActionEditor, HBoxContainer); diff --git a/modules/openxr/editor/openxr_action_map_editor.cpp b/modules/openxr/editor/openxr_action_map_editor.cpp index f1c81e79120..b53e54d84c8 100644 --- a/modules/openxr/editor/openxr_action_map_editor.cpp +++ b/modules/openxr/editor/openxr_action_map_editor.cpp @@ -37,10 +37,10 @@ #include "core/object/callable_mp.h" #include "core/object/class_db.h" #include "editor/editor_node.h" -#include "editor/gui/editor_file_dialog.h" #include "editor/settings/editor_command_palette.h" #include "editor/settings/editor_settings.h" #include "editor/themes/editor_scale.h" +#include "scene/gui/separator.h" HashMap OpenXRActionMapEditor::interaction_profile_editors; HashMap OpenXRActionMapEditor::binding_modifier_editors; diff --git a/modules/openxr/editor/openxr_action_set_editor.cpp b/modules/openxr/editor/openxr_action_set_editor.cpp index e739e2f8660..1dec62d17f9 100644 --- a/modules/openxr/editor/openxr_action_set_editor.cpp +++ b/modules/openxr/editor/openxr_action_set_editor.cpp @@ -40,7 +40,6 @@ #include "scene/gui/button.h" #include "scene/gui/line_edit.h" #include "scene/gui/panel_container.h" -#include "scene/gui/text_edit.h" void OpenXRActionSetEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_do_set_name", "name"), &OpenXRActionSetEditor::_do_set_name); diff --git a/modules/openxr/editor/openxr_binding_modifier_editor.cpp b/modules/openxr/editor/openxr_binding_modifier_editor.cpp index 02b9901799d..d4da9b4ab28 100644 --- a/modules/openxr/editor/openxr_binding_modifier_editor.cpp +++ b/modules/openxr/editor/openxr_binding_modifier_editor.cpp @@ -30,6 +30,8 @@ #include "openxr_binding_modifier_editor.h" +#include "../action_map/openxr_interaction_profile_metadata.h" + #include "core/object/callable_mp.h" #include "core/object/class_db.h" #include "editor/editor_string_names.h" diff --git a/modules/openxr/editor/openxr_binding_modifier_editor.h b/modules/openxr/editor/openxr_binding_modifier_editor.h index 44a322ae8cf..cf9b0f782ca 100644 --- a/modules/openxr/editor/openxr_binding_modifier_editor.h +++ b/modules/openxr/editor/openxr_binding_modifier_editor.h @@ -31,8 +31,8 @@ #pragma once #include "../action_map/openxr_action_map.h" -#include "../action_map/openxr_action_set.h" #include "../action_map/openxr_binding_modifier.h" + #include "editor/editor_undo_redo_manager.h" #include "editor/inspector/editor_inspector.h" #include "scene/gui/box_container.h" diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp index abb2d037fca..f4defaf651b 100644 --- a/modules/openxr/editor/openxr_select_action_dialog.cpp +++ b/modules/openxr/editor/openxr_select_action_dialog.cpp @@ -31,8 +31,12 @@ #include "openxr_select_action_dialog.h" #include "core/object/callable_mp.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `ADD_SIGNAL` macro. #include "editor/themes/editor_scale.h" +#include "scene/gui/box_container.h" +#include "scene/gui/button.h" +#include "scene/gui/label.h" +#include "scene/gui/scroll_container.h" void OpenXRSelectActionDialog::_bind_methods() { ADD_SIGNAL(MethodInfo("action_selected", PropertyInfo(Variant::STRING, "action"))); diff --git a/modules/openxr/editor/openxr_select_action_dialog.h b/modules/openxr/editor/openxr_select_action_dialog.h index 85a7fcf0e54..e80fe2e9d2e 100644 --- a/modules/openxr/editor/openxr_select_action_dialog.h +++ b/modules/openxr/editor/openxr_select_action_dialog.h @@ -32,14 +32,10 @@ #include "../action_map/openxr_action_map.h" -#include "scene/gui/box_container.h" -#include "scene/gui/button.h" #include "scene/gui/dialogs.h" -#include "scene/gui/label.h" -#include "scene/gui/line_edit.h" -#include "scene/gui/scroll_container.h" -#include "scene/gui/separator.h" -#include "scene/gui/text_edit.h" + +class VBoxContainer; +class ScrollContainer; class OpenXRSelectActionDialog : public ConfirmationDialog { GDCLASS(OpenXRSelectActionDialog, ConfirmationDialog); diff --git a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp index 16fb95d7386..50ba2cfb5a1 100644 --- a/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp +++ b/modules/openxr/editor/openxr_select_interaction_profile_dialog.cpp @@ -34,7 +34,7 @@ #include "../openxr_api.h" #include "core/object/callable_mp.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `ADD_SIGNAL` macro. #include "editor/themes/editor_scale.h" void OpenXRSelectInteractionProfileDialog::_bind_methods() { diff --git a/modules/openxr/extensions/openxr_android_thread_settings_extension.h b/modules/openxr/extensions/openxr_android_thread_settings_extension.h index b686fa100a4..e825bddcab2 100644 --- a/modules/openxr/extensions/openxr_android_thread_settings_extension.h +++ b/modules/openxr/extensions/openxr_android_thread_settings_extension.h @@ -30,7 +30,6 @@ #pragma once -#include "../openxr_interface.h" #include "core/templates/hash_map.h" #include "openxr_extension_wrapper.h" diff --git a/modules/openxr/extensions/openxr_dpad_binding_extension.h b/modules/openxr/extensions/openxr_dpad_binding_extension.h index 128ae20ae4c..c8b60f4affa 100644 --- a/modules/openxr/extensions/openxr_dpad_binding_extension.h +++ b/modules/openxr/extensions/openxr_dpad_binding_extension.h @@ -33,7 +33,6 @@ #include "../action_map/openxr_action_set.h" #include "../action_map/openxr_binding_modifier.h" #include "../action_map/openxr_haptic_feedback.h" -#include "../util.h" #include "openxr_extension_wrapper.h" class OpenXRDPadBindingExtension : public OpenXRExtensionWrapper { diff --git a/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h b/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h index c184314fbc7..4c6b9442687 100644 --- a/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h +++ b/modules/openxr/extensions/openxr_fb_display_refresh_rate_extension.h @@ -35,7 +35,6 @@ // While this is an FB extension it has been adopted by most runtimes and // will likely become core in the near future. -#include "../openxr_api.h" #include "../util.h" #include "openxr_extension_wrapper.h" diff --git a/modules/openxr/extensions/openxr_fb_foveation_extension.h b/modules/openxr/extensions/openxr_fb_foveation_extension.h index 153e046a67b..affdfccf68a 100644 --- a/modules/openxr/extensions/openxr_fb_foveation_extension.h +++ b/modules/openxr/extensions/openxr_fb_foveation_extension.h @@ -35,12 +35,12 @@ // Other Android based devices are implementing this as well, see: // https://github.khronos.org/OpenXR-Inventory/extension_support.html#XR_FB_foveation -#include "../openxr_api.h" #include "../util.h" #include "openxr_extension_wrapper.h" #include "openxr_fb_update_swapchain_extension.h" -#include "../openxr_platform_inc.h" +// Always include this as late as possible. +#include "../openxr_platform_inc.h" // IWYU pragma: keep. class OpenXRFBFoveationExtension : public OpenXRExtensionWrapper { GDCLASS(OpenXRFBFoveationExtension, OpenXRExtensionWrapper); diff --git a/modules/openxr/extensions/openxr_fb_update_swapchain_extension.h b/modules/openxr/extensions/openxr_fb_update_swapchain_extension.h index f79bac7ee26..95839da98c6 100644 --- a/modules/openxr/extensions/openxr_fb_update_swapchain_extension.h +++ b/modules/openxr/extensions/openxr_fb_update_swapchain_extension.h @@ -35,7 +35,6 @@ // Other Android based devices are implementing this as well, see: // https://github.khronos.org/OpenXR-Inventory/extension_support.html#XR_FB_swapchain_update_state -#include "../openxr_api.h" #include "../util.h" #include "openxr_composition_layer_extension.h" #include "openxr_extension_wrapper.h" diff --git a/modules/openxr/extensions/openxr_render_model_extension.cpp b/modules/openxr/extensions/openxr_render_model_extension.cpp index 0420b5b814c..91154d2b562 100644 --- a/modules/openxr/extensions/openxr_render_model_extension.cpp +++ b/modules/openxr/extensions/openxr_render_model_extension.cpp @@ -32,7 +32,6 @@ #ifdef MODULE_GLTF_ENABLED #include "../openxr_api.h" -#include "../openxr_interface.h" #include "core/config/project_settings.h" #include "core/object/class_db.h" diff --git a/modules/openxr/extensions/openxr_valve_analog_threshold_extension.h b/modules/openxr/extensions/openxr_valve_analog_threshold_extension.h index 3d614a065fc..1abffe84f73 100644 --- a/modules/openxr/extensions/openxr_valve_analog_threshold_extension.h +++ b/modules/openxr/extensions/openxr_valve_analog_threshold_extension.h @@ -32,8 +32,6 @@ #include "../action_map/openxr_binding_modifier.h" #include "../action_map/openxr_haptic_feedback.h" -#include "../util.h" -#include "core/io/resource.h" #include "openxr_extension_wrapper.h" class OpenXRValveAnalogThresholdExtension : public OpenXRExtensionWrapper { diff --git a/modules/openxr/extensions/openxr_visibility_mask_extension.h b/modules/openxr/extensions/openxr_visibility_mask_extension.h index e07bcbd04ec..13167d0ca22 100644 --- a/modules/openxr/extensions/openxr_visibility_mask_extension.h +++ b/modules/openxr/extensions/openxr_visibility_mask_extension.h @@ -31,10 +31,9 @@ #pragma once #include "../util.h" +#include "openxr_extension_wrapper.h" #include "core/templates/vector.h" -#include "openxr_extension_wrapper.h" -#include "scene/resources/mesh.h" // The OpenXR visibility mask extension provides a mesh for each eye that // can be used as a mask to determine which part of our rendered result diff --git a/modules/openxr/extensions/platform/openxr_android_extension.cpp b/modules/openxr/extensions/platform/openxr_android_extension.cpp index d1788baf070..e08d1e4bdd0 100644 --- a/modules/openxr/extensions/platform/openxr_android_extension.cpp +++ b/modules/openxr/extensions/platform/openxr_android_extension.cpp @@ -31,7 +31,6 @@ #include "openxr_android_extension.h" #include "../../openxr_api.h" - #include "java_godot_wrapper.h" #include "os_android.h" #include "thread_jandroid.h" diff --git a/modules/openxr/extensions/platform/openxr_metal_extension.h b/modules/openxr/extensions/platform/openxr_metal_extension.h index c71be519a8b..2a639d66922 100644 --- a/modules/openxr/extensions/platform/openxr_metal_extension.h +++ b/modules/openxr/extensions/platform/openxr_metal_extension.h @@ -30,14 +30,13 @@ #pragma once -#include "../../openxr_api.h" #include "../../util.h" #include "../openxr_extension_wrapper.h" #include "core/templates/vector.h" // Always include this as late as possible. -#include "../../openxr_platform_inc.h" +#include "../../openxr_platform_inc.h" // IWYU pragma: keep. class OpenXRMetalExtension : public OpenXRGraphicsExtensionWrapper { public: diff --git a/modules/openxr/extensions/platform/openxr_metal_extension.mm b/modules/openxr/extensions/platform/openxr_metal_extension.mm index 264687c9727..751601705ad 100644 --- a/modules/openxr/extensions/platform/openxr_metal_extension.mm +++ b/modules/openxr/extensions/platform/openxr_metal_extension.mm @@ -30,6 +30,7 @@ #import "openxr_metal_extension.h" +#include "../../openxr_api.h" #include "../../openxr_util.h" #import "drivers/metal/rendering_device_driver_metal.h" diff --git a/modules/openxr/extensions/platform/openxr_opengl_extension.cpp b/modules/openxr/extensions/platform/openxr_opengl_extension.cpp index 79a56fedd45..27eb51241cb 100644 --- a/modules/openxr/extensions/platform/openxr_opengl_extension.cpp +++ b/modules/openxr/extensions/platform/openxr_opengl_extension.cpp @@ -32,6 +32,7 @@ #ifdef GLES3_ENABLED +#include "../../openxr_api.h" #include "../../openxr_util.h" #include "drivers/gles3/storage/texture_storage.h" diff --git a/modules/openxr/extensions/platform/openxr_opengl_extension.h b/modules/openxr/extensions/platform/openxr_opengl_extension.h index a7691578eb4..9166a6c0a25 100644 --- a/modules/openxr/extensions/platform/openxr_opengl_extension.h +++ b/modules/openxr/extensions/platform/openxr_opengl_extension.h @@ -32,14 +32,13 @@ #ifdef GLES3_ENABLED -#include "../../openxr_api.h" #include "../../util.h" #include "../openxr_extension_wrapper.h" #include "core/templates/vector.h" // Always include this as late as possible. -#include "../../openxr_platform_inc.h" +#include "../../openxr_platform_inc.h" // IWYU pragma: keep. class OpenXROpenGLExtension : public OpenXRGraphicsExtensionWrapper { public: diff --git a/modules/openxr/extensions/platform/openxr_vulkan_extension.cpp b/modules/openxr/extensions/platform/openxr_vulkan_extension.cpp index 0b29435dd1e..40b260f1873 100644 --- a/modules/openxr/extensions/platform/openxr_vulkan_extension.cpp +++ b/modules/openxr/extensions/platform/openxr_vulkan_extension.cpp @@ -34,8 +34,6 @@ #include "../openxr_fb_foveation_extension.h" #include "core/string/print_string.h" -#include "servers/rendering/renderer_rd/effects/copy_effects.h" -#include "servers/rendering/renderer_rd/storage_rd/texture_storage.h" #include "servers/rendering/rendering_device.h" #include "servers/rendering/rendering_server.h" diff --git a/modules/openxr/extensions/platform/openxr_vulkan_extension.h b/modules/openxr/extensions/platform/openxr_vulkan_extension.h index 37168dd91a1..53152cb7f08 100644 --- a/modules/openxr/extensions/platform/openxr_vulkan_extension.h +++ b/modules/openxr/extensions/platform/openxr_vulkan_extension.h @@ -30,7 +30,6 @@ #pragma once -#include "../../openxr_api.h" #include "../../util.h" #include "../openxr_extension_wrapper.h" @@ -38,7 +37,7 @@ #include "drivers/vulkan/vulkan_hooks.h" // Always include this as late as possible. -#include "../../openxr_platform_inc.h" +#include "../../openxr_platform_inc.h" // IWYU pragma: keep. class OpenXRVulkanExtension : public OpenXRGraphicsExtensionWrapper, VulkanHooks { public: diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.cpp b/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.cpp index a7b30841b9f..644e1419f81 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.cpp +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.cpp @@ -32,7 +32,7 @@ #include "../../openxr_api.h" #include "../../openxr_util.h" -#include "../openxr_future_extension.h" +#include "openxr_spatial_entity_extension.h" #include "core/config/project_settings.h" #include "core/object/callable_mp.h" diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.h b/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.h index 6b2c0d5f7cc..285380f3d9c 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.h +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_anchor.h @@ -30,9 +30,12 @@ #pragma once -#include "../../openxr_util.h" +#include "../../openxr_structure.h" +#include "../openxr_extension_wrapper.h" +#include "../openxr_future_extension.h" #include "openxr_spatial_entities.h" -#include "openxr_spatial_entity_extension.h" + +#include "core/templates/rid_owner.h" // Anchor capability configuration class OpenXRSpatialCapabilityConfigurationAnchor : public OpenXRSpatialCapabilityConfigurationBaseHeader { diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.cpp b/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.cpp index 379bdfd8462..357453adb58 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.cpp +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.cpp @@ -31,11 +31,13 @@ #include "openxr_spatial_entities.h" #include "../../openxr_api.h" +#include "../../openxr_util.h" #include "core/object/class_db.h" -#include "core/variant/native_ptr.h" #include "openxr_spatial_entity_extension.h" +#include + //////////////////////////////////////////////////////////////////////////// // OpenXRSpatialCapabilityConfigurationBaseHeader diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.h b/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.h index 93cd7dcabb5..2be8949fdee 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.h +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_entities.h @@ -30,11 +30,11 @@ #pragma once -#include "../../openxr_structure.h" -#include "../openxr_future_extension.h" #include "scene/resources/mesh.h" #include "servers/xr/xr_positional_tracker.h" +#include + #define XR_NULL_ENTITY 0x7FFFFFFF // Wrapper class for XrSpatialCapabilityConfigurationBaseHeaderEXT diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.cpp b/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.cpp index 61d9f513071..4d3cb17759e 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.cpp +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.cpp @@ -31,11 +31,11 @@ #include "openxr_spatial_entity_extension.h" #include "../../openxr_api.h" +#include "../../openxr_util.h" #include "core/config/project_settings.h" #include "core/object/callable_mp.h" #include "core/object/class_db.h" -#include "servers/xr/xr_server.h" //////////////////////////////////////////////////////////////////////////// // OpenXRSpatialEntityExtension diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.h b/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.h index f5811b63897..fe021df6b51 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.h +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_entity_extension.h @@ -30,11 +30,13 @@ #pragma once -#include "../../openxr_util.h" +#include "../../openxr_structure.h" #include "../openxr_extension_wrapper.h" +#include "../openxr_future_extension.h" +#include "openxr_spatial_entities.h" + #include "core/templates/rid_owner.h" #include "core/variant/typed_array.h" -#include "openxr_spatial_entities.h" // Spatial entity extension class OpenXRSpatialEntityExtension : public OpenXRExtensionWrapper { diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_marker_tracking.h b/modules/openxr/extensions/spatial_entities/openxr_spatial_marker_tracking.h index b9e0d616979..324e680b8d8 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_marker_tracking.h +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_marker_tracking.h @@ -30,6 +30,8 @@ #pragma once +#include "../openxr_extension_wrapper.h" +#include "../openxr_future_extension.h" #include "openxr_spatial_entities.h" // QrCode marker tracking capability configuration diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.cpp b/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.cpp index 78f703ff43b..59b02f773f3 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.cpp +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.cpp @@ -31,6 +31,7 @@ #include "openxr_spatial_plane_tracking.h" #include "../../openxr_api.h" +#include "openxr_spatial_entity_extension.h" #include "core/config/project_settings.h" #include "core/object/callable_mp.h" diff --git a/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.h b/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.h index 7100f9205ec..af4ed58a71e 100644 --- a/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.h +++ b/modules/openxr/extensions/spatial_entities/openxr_spatial_plane_tracking.h @@ -30,8 +30,10 @@ #pragma once +#include "../openxr_extension_wrapper.h" +#include "../openxr_future_extension.h" #include "openxr_spatial_entities.h" -#include "openxr_spatial_entity_extension.h" + #include "scene/resources/3d/shape_3d.h" // Plane tracking capability configuration diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp index 04aa2cc49f4..3507b4b54ee 100644 --- a/modules/openxr/openxr_api.cpp +++ b/modules/openxr/openxr_api.cpp @@ -30,6 +30,7 @@ #include "openxr_api.h" +#include "action_map/openxr_interaction_profile_metadata.h" #include "openxr_interface.h" #include "openxr_util.h" @@ -37,12 +38,15 @@ #include "core/config/project_settings.h" #include "core/object/callable_mp.h" #include "core/os/memory.h" -#include "core/os/os.h" #include "core/profiling/profiling.h" #include "core/version.h" #include "servers/rendering/rendering_server.h" -#include "openxr_platform_inc.h" +#ifdef ANDROID_ENABLED +#include "core/os/os.h" +#endif + +#include "openxr_platform_inc.h" // IWYU pragma: keep. #ifdef VULKAN_ENABLED #include "extensions/platform/openxr_vulkan_extension.h" diff --git a/modules/openxr/openxr_api_extension.cpp b/modules/openxr/openxr_api_extension.cpp index c057af7757f..f21bba753dc 100644 --- a/modules/openxr/openxr_api_extension.cpp +++ b/modules/openxr/openxr_api_extension.cpp @@ -31,9 +31,10 @@ #include "openxr_api_extension.h" #include "openxr_api_extension.compat.inc" -#include "core/object/class_db.h" #include "extensions/openxr_extension_wrapper.h" +#include "openxr_api.h" +#include "core/object/class_db.h" #include "servers/rendering/rendering_server.h" // ERR_NOT_ON_RENDER_THREAD_V void OpenXRAPIExtension::_bind_methods() { diff --git a/modules/openxr/openxr_api_extension.h b/modules/openxr/openxr_api_extension.h index 103ca4b6c05..bd4ee3e35d7 100644 --- a/modules/openxr/openxr_api_extension.h +++ b/modules/openxr/openxr_api_extension.h @@ -30,12 +30,12 @@ #pragma once -#include "openxr_api.h" - #include "core/object/ref_counted.h" #include "core/os/thread_safe.h" #include "core/variant/native_ptr.h" +#include + class OpenXRExtensionWrapper; class OpenXRExtensionWrapperExtension; diff --git a/modules/openxr/openxr_interface.cpp b/modules/openxr/openxr_interface.cpp index 65f14a47320..b4b40d3c286 100644 --- a/modules/openxr/openxr_interface.cpp +++ b/modules/openxr/openxr_interface.cpp @@ -30,6 +30,7 @@ #include "openxr_interface.h" +#include "action_map/openxr_action_map.h" #include "extensions/openxr_eye_gaze_interaction.h" #include "extensions/openxr_hand_interaction_extension.h" #include "extensions/openxr_performance_settings_extension.h" diff --git a/modules/openxr/openxr_interface.h b/modules/openxr/openxr_interface.h index d3fec0d4aaf..4c70567d4ea 100644 --- a/modules/openxr/openxr_interface.h +++ b/modules/openxr/openxr_interface.h @@ -53,7 +53,6 @@ // As some data is setup before we start rendering, and cleaned up // after we've stopped, that is accessed directly from both threads. -#include "action_map/openxr_action_map.h" #include "extensions/openxr_hand_tracking_extension.h" #include "openxr_api.h" diff --git a/modules/openxr/openxr_structure.h b/modules/openxr/openxr_structure.h index 1f06c82d581..235bf98639b 100644 --- a/modules/openxr/openxr_structure.h +++ b/modules/openxr/openxr_structure.h @@ -32,8 +32,8 @@ #include "core/object/gdvirtual.gen.h" #include "core/object/ref_counted.h" -#include "openxr_util.h" -#include "util.h" + +#include // Base class for XrStructureType based headers class OpenXRStructureBase : public RefCounted { diff --git a/modules/openxr/openxr_util.cpp b/modules/openxr/openxr_util.cpp index 2feb7f1d4f6..98ae209d12a 100644 --- a/modules/openxr/openxr_util.cpp +++ b/modules/openxr/openxr_util.cpp @@ -245,11 +245,11 @@ void OpenXRUtil::XrMatrix4x4f_CreateProjection(XrMatrix4x4f *result, const float // Creates a projection matrix based on the specified FOV. void OpenXRUtil::XrMatrix4x4f_CreateProjectionFov(XrMatrix4x4f *result, const XrFovf fov, const float nearZ, const float farZ) { - const float tanLeft = std::tan(fov.angleLeft); - const float tanRight = std::tan(fov.angleRight); + const float tanLeft = Math::tan(fov.angleLeft); + const float tanRight = Math::tan(fov.angleRight); - const float tanDown = std::tan(fov.angleDown); - const float tanUp = std::tan(fov.angleUp); + const float tanDown = Math::tan(fov.angleDown); + const float tanUp = Math::tan(fov.angleUp); XrMatrix4x4f_CreateProjection(result, tanLeft, tanRight, tanUp, tanDown, nearZ, farZ); } diff --git a/modules/openxr/register_types.cpp b/modules/openxr/register_types.cpp index 7b0d338abf2..22d2809803f 100644 --- a/modules/openxr/register_types.cpp +++ b/modules/openxr/register_types.cpp @@ -104,7 +104,6 @@ #include "core/config/engine.h" #include "core/config/project_settings.h" #include "core/os/os.h" -#include "main/main.h" #ifdef TOOLS_ENABLED #include "editor/editor_node.h" diff --git a/modules/openxr/scene/openxr_composition_layer_cylinder.cpp b/modules/openxr/scene/openxr_composition_layer_cylinder.cpp index 541640cb0f4..1f25f093a96 100644 --- a/modules/openxr/scene/openxr_composition_layer_cylinder.cpp +++ b/modules/openxr/scene/openxr_composition_layer_cylinder.cpp @@ -31,7 +31,6 @@ #include "openxr_composition_layer_cylinder.h" #include "../extensions/openxr_composition_layer_extension.h" -#include "../openxr_interface.h" #include "core/object/class_db.h" #include "scene/resources/mesh.h" diff --git a/modules/openxr/scene/openxr_composition_layer_equirect.cpp b/modules/openxr/scene/openxr_composition_layer_equirect.cpp index f62289c7beb..ff54dcc60b9 100644 --- a/modules/openxr/scene/openxr_composition_layer_equirect.cpp +++ b/modules/openxr/scene/openxr_composition_layer_equirect.cpp @@ -31,7 +31,6 @@ #include "openxr_composition_layer_equirect.h" #include "../extensions/openxr_composition_layer_extension.h" -#include "../openxr_interface.h" #include "core/object/class_db.h" #include "scene/resources/mesh.h" diff --git a/modules/openxr/scene/openxr_composition_layer_quad.cpp b/modules/openxr/scene/openxr_composition_layer_quad.cpp index 75182468d1a..f28a0cd9109 100644 --- a/modules/openxr/scene/openxr_composition_layer_quad.cpp +++ b/modules/openxr/scene/openxr_composition_layer_quad.cpp @@ -31,7 +31,6 @@ #include "openxr_composition_layer_quad.h" #include "../extensions/openxr_composition_layer_extension.h" -#include "../openxr_interface.h" #include "core/object/class_db.h" #include "scene/resources/3d/primitive_meshes.h" diff --git a/modules/openxr/scene/openxr_render_model.cpp b/modules/openxr/scene/openxr_render_model.cpp index 9c637dd32d2..690ff7413f2 100644 --- a/modules/openxr/scene/openxr_render_model.cpp +++ b/modules/openxr/scene/openxr_render_model.cpp @@ -37,9 +37,6 @@ #include "core/config/project_settings.h" #include "core/object/callable_mp.h" #include "core/object/class_db.h" -#include "scene/3d/mesh_instance_3d.h" -#include "scene/3d/xr/xr_nodes.h" -#include "scene/resources/3d/primitive_meshes.h" void OpenXRRenderModel::_bind_methods() { ClassDB::bind_method(D_METHOD("get_top_level_path"), &OpenXRRenderModel::get_top_level_path); diff --git a/modules/openxr/scene/openxr_render_model_manager.cpp b/modules/openxr/scene/openxr_render_model_manager.cpp index e1515c609a2..3a1f1d51117 100644 --- a/modules/openxr/scene/openxr_render_model_manager.cpp +++ b/modules/openxr/scene/openxr_render_model_manager.cpp @@ -31,8 +31,10 @@ #include "openxr_render_model_manager.h" #ifdef MODULE_GLTF_ENABLED + #include "../extensions/openxr_render_model_extension.h" #include "../openxr_api.h" +#include "openxr_render_model.h" #include "core/config/engine.h" #include "core/config/project_settings.h" diff --git a/modules/openxr/scene/openxr_render_model_manager.h b/modules/openxr/scene/openxr_render_model_manager.h index 63c68a02969..1b7a134314c 100644 --- a/modules/openxr/scene/openxr_render_model_manager.h +++ b/modules/openxr/scene/openxr_render_model_manager.h @@ -33,10 +33,8 @@ #include "modules/modules_enabled.gen.h" #ifdef MODULE_GLTF_ENABLED -#include "openxr_render_model.h" #include "scene/3d/node_3d.h" -#include "scene/resources/packed_scene.h" #include "servers/xr/xr_positional_tracker.h" #include @@ -85,4 +83,5 @@ protected: }; VARIANT_ENUM_CAST(OpenXRRenderModelManager::RenderModelTracker); + #endif // MODULE_GLTF_ENABLED diff --git a/modules/openxr/scene/openxr_visibility_mask.cpp b/modules/openxr/scene/openxr_visibility_mask.cpp index e482b150706..5f1129458ae 100644 --- a/modules/openxr/scene/openxr_visibility_mask.cpp +++ b/modules/openxr/scene/openxr_visibility_mask.cpp @@ -34,13 +34,9 @@ #include "../openxr_interface.h" #include "core/object/callable_mp.h" -#include "core/object/class_db.h" #include "scene/3d/xr/xr_nodes.h" #include "servers/rendering/rendering_server.h" -void OpenXRVisibilityMask::_bind_methods() { -} - void OpenXRVisibilityMask::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: { diff --git a/modules/openxr/scene/openxr_visibility_mask.h b/modules/openxr/scene/openxr_visibility_mask.h index 419d7b76c2e..06edfb81d27 100644 --- a/modules/openxr/scene/openxr_visibility_mask.h +++ b/modules/openxr/scene/openxr_visibility_mask.h @@ -36,8 +36,6 @@ class OpenXRVisibilityMask : public VisualInstance3D { GDCLASS(OpenXRVisibilityMask, VisualInstance3D); protected: - static void _bind_methods(); - void _notification(int p_what); void _on_openxr_session_begun(); diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp index ca4c02e8b24..ccd78859ff7 100644 --- a/modules/svg/image_loader_svg.cpp +++ b/modules/svg/image_loader_svg.cpp @@ -30,7 +30,6 @@ #include "image_loader_svg.h" -#include "core/os/memory.h" #include "core/variant/variant.h" #include diff --git a/modules/svg/register_types.cpp b/modules/svg/register_types.cpp index ed5fa2fabfa..82d816d8331 100644 --- a/modules/svg/register_types.cpp +++ b/modules/svg/register_types.cpp @@ -32,8 +32,6 @@ #include "image_loader_svg.h" -#include "core/config/engine.h" - #include #ifdef THREADS_ENABLED diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index cd715831e8c..e0a0cd53e8a 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -33,6 +33,7 @@ #include "core/config/project_settings.h" #include "core/error/error_macros.h" #include "core/io/file_access.h" +#include "core/math/math_funcs_binary.h" #include "core/object/callable_mp.h" #include "core/object/worker_thread_pool.h" #include "core/os/os.h" diff --git a/modules/text_server_adv/thorvg_svg_in_ot.cpp b/modules/text_server_adv/thorvg_svg_in_ot.cpp index eae9703b18f..3cb643d729b 100644 --- a/modules/text_server_adv/thorvg_svg_in_ot.cpp +++ b/modules/text_server_adv/thorvg_svg_in_ot.cpp @@ -33,7 +33,6 @@ #include "core/error/error_macros.h" #include "core/io/xml_parser.h" #include "core/os/memory.h" -#include "core/os/os.h" #include "core/string/ustring.h" #include "core/typedefs.h" #include "core/variant/variant.h" @@ -46,8 +45,6 @@ #include #include -#include - FT_Error tvg_svg_in_ot_init(FT_Pointer *p_state) { *p_state = memnew(TVG_State); diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 82d80aada81..2209ddb954f 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -33,7 +33,9 @@ #include "core/config/project_settings.h" #include "core/error/error_macros.h" #include "core/io/file_access.h" +#include "core/math/math_funcs_binary.h" #include "core/object/callable_mp.h" +#include "core/object/worker_thread_pool.h" #include "core/os/os.h" #include "core/string/print_string.h" #include "core/string/translation_server.h" diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h index a91c94de283..88731e19814 100644 --- a/modules/text_server_fb/text_server_fb.h +++ b/modules/text_server_fb/text_server_fb.h @@ -36,7 +36,6 @@ /*************************************************************************/ #include "core/extension/ext_wrappers.gen.h" -#include "core/object/worker_thread_pool.h" #include "core/templates/hash_map.h" #include "core/templates/rid_owner.h" #include "core/templates/safe_refcount.h" diff --git a/modules/text_server_fb/thorvg_svg_in_ot.cpp b/modules/text_server_fb/thorvg_svg_in_ot.cpp index 4b9f3f804cc..3cb643d729b 100644 --- a/modules/text_server_fb/thorvg_svg_in_ot.cpp +++ b/modules/text_server_fb/thorvg_svg_in_ot.cpp @@ -45,8 +45,6 @@ #include #include -#include - FT_Error tvg_svg_in_ot_init(FT_Pointer *p_state) { *p_state = memnew(TVG_State); diff --git a/modules/vorbis/resource_importer_ogg_vorbis.cpp b/modules/vorbis/resource_importer_ogg_vorbis.cpp index f0f6c73c9d5..f30add65c67 100644 --- a/modules/vorbis/resource_importer_ogg_vorbis.cpp +++ b/modules/vorbis/resource_importer_ogg_vorbis.cpp @@ -30,7 +30,6 @@ #include "resource_importer_ogg_vorbis.h" -#include "core/io/file_access.h" #include "core/io/resource_saver.h" #include "core/object/class_db.h" diff --git a/modules/webrtc/webrtc_data_channel_extension.cpp b/modules/webrtc/webrtc_data_channel_extension.cpp index 368caba6726..e2c3632bf83 100644 --- a/modules/webrtc/webrtc_data_channel_extension.cpp +++ b/modules/webrtc/webrtc_data_channel_extension.cpp @@ -30,7 +30,7 @@ #include "webrtc_data_channel_extension.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `GDVIRTUAL_BIND` macro. void WebRTCDataChannelExtension::_bind_methods() { ADD_PROPERTY_DEFAULT("write_mode", WRITE_MODE_BINARY); diff --git a/modules/webrtc/webrtc_peer_connection_extension.cpp b/modules/webrtc/webrtc_peer_connection_extension.cpp index 815b869c34d..fa1f8c6601c 100644 --- a/modules/webrtc/webrtc_peer_connection_extension.cpp +++ b/modules/webrtc/webrtc_peer_connection_extension.cpp @@ -30,7 +30,7 @@ #include "webrtc_peer_connection_extension.h" -#include "core/object/class_db.h" +#include "core/object/class_db.h" // IWYU pragma: keep. `GDVIRTUAL_BIND` macro. void WebRTCPeerConnectionExtension::_bind_methods() { GDVIRTUAL_BIND(_get_connection_state); diff --git a/modules/webrtc/webrtc_peer_connection_extension.h b/modules/webrtc/webrtc_peer_connection_extension.h index 76f26ff2e6a..6fffe98f607 100644 --- a/modules/webrtc/webrtc_peer_connection_extension.h +++ b/modules/webrtc/webrtc_peer_connection_extension.h @@ -33,7 +33,6 @@ #include "webrtc_peer_connection.h" #include "core/extension/ext_wrappers.gen.h" -#include "core/object/gdvirtual.gen.h" class WebRTCPeerConnectionExtension : public WebRTCPeerConnection { GDCLASS(WebRTCPeerConnectionExtension, WebRTCPeerConnection); diff --git a/modules/webxr/register_types.cpp b/modules/webxr/register_types.cpp index 31207da3d30..0f720ccc59d 100644 --- a/modules/webxr/register_types.cpp +++ b/modules/webxr/register_types.cpp @@ -31,7 +31,10 @@ #include "register_types.h" #include "webxr_interface.h" + +#ifdef WEB_ENABLED #include "webxr_interface_js.h" +#endif #include "core/object/class_db.h" diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 19d5eacf918..c216c567fc8 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -44,10 +44,13 @@ #include "scene/resources/environment.h" #include "scene/resources/image_texture.h" #include "scene/resources/sky.h" -#include "servers/display/display_server.h" #include "servers/rendering/rendering_server.h" -#include "modules/modules_enabled.gen.h" // For lightmapper_rd. +#include "modules/modules_enabled.gen.h" // IWYU pragma: keep. For lightmapper_rd. + +#ifdef MODULE_LIGHTMAPPER_RD_ENABLED +#include "servers/display/display_server.h" +#endif #if defined(ANDROID_ENABLED) || defined(APPLE_EMBEDDED_ENABLED) #include "core/os/os.h" diff --git a/servers/rendering/dummy/storage/texture_storage.h b/servers/rendering/dummy/storage/texture_storage.h index adb1ba7ecfa..51972f199d3 100644 --- a/servers/rendering/dummy/storage/texture_storage.h +++ b/servers/rendering/dummy/storage/texture_storage.h @@ -30,6 +30,7 @@ #pragma once +#include "core/templates/rid_owner.h" #include "servers/rendering/storage/texture_storage.h" namespace RendererDummy {