From eeb7c04aaffb281a1a10510db9c4a0e6b4310e9f Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 16 Mar 2022 20:53:38 +0100 Subject: [PATCH] Moved more includes to cpp files. --- editor/plugins/multimesh_editor_plugin.cpp | 1 + modules/gltf/gltf_document.cpp | 1 + modules/navigation/navigation_mesh_generator.cpp | 1 + scene/3d/mesh_instance.cpp | 3 +++ scene/3d/mesh_instance.h | 12 ++++++++---- scene/3d/multimesh_instance.cpp | 2 ++ scene/3d/multimesh_instance.h | 5 ++++- scene/3d/room_manager.cpp | 1 + scene/register_scene_types.cpp | 1 + 9 files changed, 22 insertions(+), 5 deletions(-) diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp index 7d1e36b84..24a0dba88 100644 --- a/editor/plugins/multimesh_editor_plugin.cpp +++ b/editor/plugins/multimesh_editor_plugin.cpp @@ -33,6 +33,7 @@ #include "scene/3d/mesh_instance.h" #include "scene/gui/box_container.h" #include "spatial_editor_plugin.h" +#include "scene/resources/multimesh.h" void MultiMeshEditor::_node_removed(Node *p_node) { if (p_node == node) { diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index b2b2fe7ec..11b2f0002 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -58,6 +58,7 @@ #include "scene/animation/animation_player.h" #include "scene/main/node.h" #include "scene/resources/surface_tool.h" +#include "scene/resources/multimesh.h" #include "modules/modules_enabled.gen.h" // For csg, gridmap, regex. diff --git a/modules/navigation/navigation_mesh_generator.cpp b/modules/navigation/navigation_mesh_generator.cpp index 155a95abf..16863703c 100644 --- a/modules/navigation/navigation_mesh_generator.cpp +++ b/modules/navigation/navigation_mesh_generator.cpp @@ -48,6 +48,7 @@ #include "scene/resources/primitive_meshes.h" #include "scene/resources/shape.h" #include "scene/resources/sphere_shape.h" +#include "scene/resources/multimesh.h" #include "modules/modules_enabled.gen.h" // For csg, gridmap. diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 32e5b1e2c..eedcb5c37 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -38,6 +38,9 @@ #include "scene/scene_string_names.h" #include "servers/visual/visual_server_globals.h" #include "skeleton.h" +#include "scene/3d/skeleton.h" +#include "scene/resources/mesh.h" +#include "scene/resources/skin.h" bool MeshInstance::_set(const StringName &p_name, const Variant &p_value) { //this is not _too_ bad performance wise, really. it only arrives here if the property was not set anywhere else. diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h index 8508b67eb..cebcc35e8 100644 --- a/scene/3d/mesh_instance.h +++ b/scene/3d/mesh_instance.h @@ -31,13 +31,17 @@ #ifndef MESH_INSTANCE_H #define MESH_INSTANCE_H -#include "scene/3d/skeleton.h" -#include "scene/3d/visual_instance.h" -#include "scene/resources/mesh.h" -#include "scene/resources/skin.h" +#include "scene/3d/visual_instance.h" + +#include "core/reference.h" #include "core/local_vector.h" +class Mesh; +class Skin; +class SkinReference; +class NodePath; + class MeshInstance : public GeometryInstance { GDCLASS(MeshInstance, GeometryInstance); diff --git a/scene/3d/multimesh_instance.cpp b/scene/3d/multimesh_instance.cpp index 96fa7f0bc..b682d128d 100644 --- a/scene/3d/multimesh_instance.cpp +++ b/scene/3d/multimesh_instance.cpp @@ -30,6 +30,8 @@ #include "multimesh_instance.h" +#include "scene/resources/multimesh.h" + void MultiMeshInstance::_bind_methods() { ClassDB::bind_method(D_METHOD("set_multimesh", "multimesh"), &MultiMeshInstance::set_multimesh); ClassDB::bind_method(D_METHOD("get_multimesh"), &MultiMeshInstance::get_multimesh); diff --git a/scene/3d/multimesh_instance.h b/scene/3d/multimesh_instance.h index bd38d876c..65de46a7b 100644 --- a/scene/3d/multimesh_instance.h +++ b/scene/3d/multimesh_instance.h @@ -32,7 +32,10 @@ #define MULTIMESH_INSTANCE_H #include "scene/3d/visual_instance.h" -#include "scene/resources/multimesh.h" + +#include "core/reference.h" + +class MultiMesh; class MultiMeshInstance : public GeometryInstance { GDCLASS(MultiMeshInstance, GeometryInstance); diff --git a/scene/3d/room_manager.cpp b/scene/3d/room_manager.cpp index 9b7927f34..0a18ec5d9 100644 --- a/scene/3d/room_manager.cpp +++ b/scene/3d/room_manager.cpp @@ -43,6 +43,7 @@ #include "scene/3d/light.h" #include "scene/3d/sprite_3d.h" #include "visibility_notifier.h" +#include "scene/resources/multimesh.h" #ifdef TOOLS_ENABLED #include "editor/plugins/spatial_editor_plugin.h" diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 021f98e76..876f22134 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -186,6 +186,7 @@ #include "scene/3d/listener.h" #include "scene/3d/mesh_instance.h" #include "scene/3d/multimesh_instance.h" +#include "scene/resources/multimesh.h" #include "scene/3d/navigation.h" #include "scene/3d/navigation_agent.h" #include "scene/3d/navigation_mesh_instance.h"