diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index ccb6b7458..8a9629205 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -30,8 +30,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - +#include "core/pair.h" #include "core/io/resource_importer.h" #include "scene/resources/animation.h" diff --git a/modules/gltf/editor_scene_importer_gltf.h b/modules/gltf/editor_scene_importer_gltf.h index 978ac6bec..dc222cc84 100644 --- a/modules/gltf/editor_scene_importer_gltf.h +++ b/modules/gltf/editor_scene_importer_gltf.h @@ -32,9 +32,6 @@ #ifdef TOOLS_ENABLED - - - #include "editor/import/resource_importer_scene.h" #include "gltf_document.h" diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h index 285578ee5..3b9be1d79 100644 --- a/scene/main/canvas_layer.h +++ b/scene/main/canvas_layer.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/main/node.h" class Viewport; diff --git a/scene/main/http_request.h b/scene/main/http_request.h index 64961e6df..60132e949 100644 --- a/scene/main/http_request.h +++ b/scene/main/http_request.h @@ -30,13 +30,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - -#include "node.h" #include "core/io/http_client.h" -#include "core/safe_refcount.h" #include "core/os/thread.h" +#include "core/safe_refcount.h" +#include "node.h" class Timer; diff --git a/scene/main/instance_placeholder.h b/scene/main/instance_placeholder.h index 9feb3a31f..cad1ab2d6 100644 --- a/scene/main/instance_placeholder.h +++ b/scene/main/instance_placeholder.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/main/node.h" class PackedScene; diff --git a/scene/main/node.h b/scene/main/node.h index b6d3c0361..0bc6cc071 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/object.h" #include "core/map.h" diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h index 4406ed7fa..eb895c222 100644 --- a/scene/main/resource_preloader.h +++ b/scene/main/resource_preloader.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/main/node.h" class ResourcePreloader : public Node { diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h index 56b788d5c..c8230cc88 100644 --- a/scene/main/scene_tree.h +++ b/scene/main/scene_tree.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/io/multiplayer_api.h" #include "core/os/main_loop.h" #include "core/os/thread_safe.h" diff --git a/scene/main/timer.h b/scene/main/timer.h index 901f7e890..b9f5b1526 100644 --- a/scene/main/timer.h +++ b/scene/main/timer.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/main/node.h" class Timer : public Node { diff --git a/scene/main/viewport.h b/scene/main/viewport.h index dcb0e79c6..c9b74c922 100644 --- a/scene/main/viewport.h +++ b/scene/main/viewport.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/math/transform_2d.h" #include "scene/main/node.h" #include "scene/resources/texture.h" diff --git a/scene/resources/animation.h b/scene/resources/animation.h index 4c0f67c32..3aa53299c 100644 --- a/scene/resources/animation.h +++ b/scene/resources/animation.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/resource.h" #define ANIM_MIN_LENGTH 0.001 diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h index ea09edd03..34a60952c 100644 --- a/scene/resources/audio_stream_sample.h +++ b/scene/resources/audio_stream_sample.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "servers/audio/audio_stream.h" class AudioStreamSample; diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 1b833b832..0e047b89c 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -31,6 +31,7 @@ #include "bit_map.h" #include "core/io/image_loader.h" +#include "core/io/resource_loader.h" void BitMap::create(const Size2 &p_size) { ERR_FAIL_COND(p_size.width < 1); diff --git a/scene/resources/bit_map.h b/scene/resources/bit_map.h index a0242e4be..bb1ee2580 100644 --- a/scene/resources/bit_map.h +++ b/scene/resources/bit_map.h @@ -30,11 +30,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/image.h" -#include "core/io/resource_loader.h" #include "core/resource.h" class BitMap : public Resource { diff --git a/scene/resources/box_shape.h b/scene/resources/box_shape.h index ef2f7c7a9..f3dc6e51e 100644 --- a/scene/resources/box_shape.h +++ b/scene/resources/box_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape.h" class BoxShape : public Shape { diff --git a/scene/resources/capsule_shape.h b/scene/resources/capsule_shape.h index 3f0573dc4..c2eeeeb14 100644 --- a/scene/resources/capsule_shape.h +++ b/scene/resources/capsule_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape.h" class CapsuleShape : public Shape { diff --git a/scene/resources/capsule_shape_2d.h b/scene/resources/capsule_shape_2d.h index 9c1595b4c..004a89eae 100644 --- a/scene/resources/capsule_shape_2d.h +++ b/scene/resources/capsule_shape_2d.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape_2d.h" class CapsuleShape2D : public Shape2D { diff --git a/scene/resources/circle_shape_2d.h b/scene/resources/circle_shape_2d.h index 79218ae47..863022c16 100644 --- a/scene/resources/circle_shape_2d.h +++ b/scene/resources/circle_shape_2d.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape_2d.h" class CircleShape2D : public Shape2D { diff --git a/scene/resources/concave_polygon_shape.h b/scene/resources/concave_polygon_shape.h index 0379c84f3..707a3eac2 100644 --- a/scene/resources/concave_polygon_shape.h +++ b/scene/resources/concave_polygon_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape.h" class ConcavePolygonShape : public Shape { diff --git a/scene/resources/concave_polygon_shape_2d.h b/scene/resources/concave_polygon_shape_2d.h index 4eaa2a224..c7a3c0ce4 100644 --- a/scene/resources/concave_polygon_shape_2d.h +++ b/scene/resources/concave_polygon_shape_2d.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape_2d.h" class ConcavePolygonShape2D : public Shape2D { diff --git a/scene/resources/convex_polygon_shape.h b/scene/resources/convex_polygon_shape.h index 660af2889..095004686 100644 --- a/scene/resources/convex_polygon_shape.h +++ b/scene/resources/convex_polygon_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape.h" class ConvexPolygonShape : public Shape { diff --git a/scene/resources/convex_polygon_shape_2d.h b/scene/resources/convex_polygon_shape_2d.h index 7e60c487a..dfae28ffa 100644 --- a/scene/resources/convex_polygon_shape_2d.h +++ b/scene/resources/convex_polygon_shape_2d.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape_2d.h" class ConvexPolygonShape2D : public Shape2D { diff --git a/scene/resources/curve.h b/scene/resources/curve.h index f1afa607f..02334fc1e 100644 --- a/scene/resources/curve.h +++ b/scene/resources/curve.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/resource.h" // y(x) curve diff --git a/scene/resources/cylinder_shape.h b/scene/resources/cylinder_shape.h index 1fc7d13d9..8f5f71ff5 100644 --- a/scene/resources/cylinder_shape.h +++ b/scene/resources/cylinder_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape.h" class CylinderShape : public Shape { diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h index d4ee43caa..f9079e40f 100644 --- a/scene/resources/dynamic_font.h +++ b/scene/resources/dynamic_font.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "modules/modules_enabled.gen.h" // For freetype. #ifdef MODULE_FREETYPE_ENABLED @@ -41,6 +38,7 @@ #include "core/os/thread_safe.h" #include "core/pair.h" #include "scene/resources/font.h" +#include "scene/resources/texture.h" #include #include FT_FREETYPE_H diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 1baa0ffe2..e5cd596bb 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -33,6 +33,9 @@ #include "core/project_settings.h" #include "servers/visual_server.h" #include "texture.h" +#include "scene/resources/sky.h" +#include "scene/resources/texture.h" +#include "servers/visual_server.h" RID Environment::get_rid() const { return environment; diff --git a/scene/resources/environment.h b/scene/resources/environment.h index 3c591d7f4..4a1b5bab0 100644 --- a/scene/resources/environment.h +++ b/scene/resources/environment.h @@ -30,13 +30,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/resource.h" -#include "scene/resources/sky.h" -#include "scene/resources/texture.h" -#include "servers/visual_server.h" + +class Sky; +class Texture; class Environment : public Resource { GDCLASS(Environment, Resource); diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 130ffda15..c7b98c34e 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -30,9 +30,9 @@ #include "font.h" -#include "core/io/resource_loader.h" #include "core/method_bind_ext.gen.inc" #include "core/os/file_access.h" +#include "scene/resources/texture.h" void Font::draw_halign(RID p_canvas_item, const Point2 &p_pos, HAlign p_align, float p_width, const String &p_text, const Color &p_modulate, const Color &p_outline_modulate) const { float length = get_string_size(p_text).width; diff --git a/scene/resources/font.h b/scene/resources/font.h index fc695164f..443468574 100644 --- a/scene/resources/font.h +++ b/scene/resources/font.h @@ -30,12 +30,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/map.h" #include "core/resource.h" -#include "scene/resources/texture.h" +#include "core/io/resource_loader.h" + +class Texture; class Font : public Resource { GDCLASS(Font, Resource); diff --git a/scene/resources/gradient.h b/scene/resources/gradient.h index 3f0e60ff3..a1f1295ac 100644 --- a/scene/resources/gradient.h +++ b/scene/resources/gradient.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/resource.h" class Gradient : public Resource { diff --git a/scene/resources/height_map_shape.h b/scene/resources/height_map_shape.h index ac5660c26..a150d2c21 100644 --- a/scene/resources/height_map_shape.h +++ b/scene/resources/height_map_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape.h" class HeightMapShape : public Shape { diff --git a/scene/resources/line_shape_2d.h b/scene/resources/line_shape_2d.h index 7c371784c..d5ddfeb0f 100644 --- a/scene/resources/line_shape_2d.h +++ b/scene/resources/line_shape_2d.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/shape_2d.h" class LineShape2D : public Shape2D { diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index e0b51367e..ebcacc6e0 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -33,6 +33,8 @@ #include "core/engine.h" #include "core/project_settings.h" #include "core/version.h" +#include "scene/resources/texture.h" +#include "servers/visual/shader_language.h" #ifdef TOOLS_ENABLED #include "editor/editor_settings.h" diff --git a/scene/resources/material.h b/scene/resources/material.h index f74bd11ae..5045e09d1 100644 --- a/scene/resources/material.h +++ b/scene/resources/material.h @@ -30,15 +30,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - -#include "core/resource.h" #include "core/self_list.h" -#include "scene/resources/shader.h" -#include "scene/resources/texture.h" -#include "servers/visual/shader_language.h" +#include "core/resource.h" #include "servers/visual_server.h" +#include "scene/resources/shader.h" + +class Texture; class Material : public Resource { GDCLASS(Material, Resource); diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 7649adc7b..cbd11d59b 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -30,12 +30,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/math/face3.h" #include "core/math/triangle_mesh.h" #include "core/resource.h" + #include "scene/resources/material.h" #include "scene/resources/shape.h" #include "servers/visual_server.h" diff --git a/scene/resources/mesh_data_tool.h b/scene/resources/mesh_data_tool.h index efa6e3e4b..7401a0cd1 100644 --- a/scene/resources/mesh_data_tool.h +++ b/scene/resources/mesh_data_tool.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/mesh.h" class MeshDataTool : public Reference { diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h index 1133d75bc..4f3fb0b01 100644 --- a/scene/resources/multimesh.h +++ b/scene/resources/multimesh.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/mesh.h" #include "servers/visual_server.h" diff --git a/scene/resources/navigation_mesh.h b/scene/resources/navigation_mesh.h index 2551b97c9..983f939e4 100644 --- a/scene/resources/navigation_mesh.h +++ b/scene/resources/navigation_mesh.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "scene/resources/mesh.h" class Mesh; diff --git a/scene/resources/occluder_shape.h b/scene/resources/occluder_shape.h index f758943aa..959a02cee 100644 --- a/scene/resources/occluder_shape.h +++ b/scene/resources/occluder_shape.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "core/math/plane.h" #include "core/resource.h" #include "core/vector.h" diff --git a/scene/resources/occluder_shape_polygon.h b/scene/resources/occluder_shape_polygon.h index ee9e21244..f4aa4e9b9 100644 --- a/scene/resources/occluder_shape_polygon.h +++ b/scene/resources/occluder_shape_polygon.h @@ -30,9 +30,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ - - - #include "occluder_shape.h" class OccluderShapePolygon : public OccluderShape {