summaryrefslogtreecommitdiff
path: root/modules/gltf/extensions
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-11-29 00:50:26 -0600
committerAaron Franke <arnfranke@yahoo.com>2022-11-29 23:11:08 -0600
commit1bbbee384d95ada691a0f6f5b25c76192ba31a50 (patch)
treeb2d07994a2b08a267c849ba1d0fa7f523c7eb4c1 /modules/gltf/extensions
parent5826e960143fd416e0d02cf8f672d778f56da9ea (diff)
GLTF: Clean up lots of includes
Diffstat (limited to 'modules/gltf/extensions')
-rw-r--r--modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.cpp4
-rw-r--r--modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.h4
-rw-r--r--modules/gltf/extensions/gltf_light.cpp2
-rw-r--r--modules/gltf/extensions/gltf_light.h4
-rw-r--r--modules/gltf/extensions/gltf_spec_gloss.cpp2
-rw-r--r--modules/gltf/extensions/gltf_spec_gloss.h3
6 files changed, 9 insertions, 10 deletions
diff --git a/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.cpp b/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.cpp
index 49496afb62..cfa498af65 100644
--- a/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.cpp
+++ b/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.cpp
@@ -30,9 +30,7 @@
#include "gltf_document_extension_convert_importer_mesh.h"
-#include "../gltf_state.h"
-
-#include "core/error/error_macros.h"
+#include "scene/3d/importer_mesh_instance_3d.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/resources/importer_mesh.h"
diff --git a/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.h b/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.h
index 00e664e73f..4fbfa0e066 100644
--- a/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.h
+++ b/modules/gltf/extensions/gltf_document_extension_convert_importer_mesh.h
@@ -33,10 +33,6 @@
#include "gltf_document_extension.h"
-#include "scene/3d/importer_mesh_instance_3d.h"
-#include "scene/3d/mesh_instance_3d.h"
-#include "scene/resources/importer_mesh.h"
-
class GLTFDocumentExtensionConvertImporterMesh : public GLTFDocumentExtension {
GDCLASS(GLTFDocumentExtensionConvertImporterMesh, GLTFDocumentExtension);
diff --git a/modules/gltf/extensions/gltf_light.cpp b/modules/gltf/extensions/gltf_light.cpp
index d00bead61c..0379c62c9d 100644
--- a/modules/gltf/extensions/gltf_light.cpp
+++ b/modules/gltf/extensions/gltf_light.cpp
@@ -30,6 +30,8 @@
#include "gltf_light.h"
+#include "scene/3d/light_3d.h"
+
void GLTFLight::_bind_methods() {
ClassDB::bind_static_method("GLTFLight", D_METHOD("from_node", "light_node"), &GLTFLight::from_node);
ClassDB::bind_method(D_METHOD("to_node"), &GLTFLight::to_node);
diff --git a/modules/gltf/extensions/gltf_light.h b/modules/gltf/extensions/gltf_light.h
index 04980e144c..85284f1d0e 100644
--- a/modules/gltf/extensions/gltf_light.h
+++ b/modules/gltf/extensions/gltf_light.h
@@ -31,9 +31,9 @@
#ifndef GLTF_LIGHT_H
#define GLTF_LIGHT_H
-#include "core/config/engine.h"
#include "core/io/resource.h"
-#include "scene/3d/light_3d.h"
+
+class Light3D;
// https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual
diff --git a/modules/gltf/extensions/gltf_spec_gloss.cpp b/modules/gltf/extensions/gltf_spec_gloss.cpp
index 83af91bfcc..0645f31e01 100644
--- a/modules/gltf/extensions/gltf_spec_gloss.cpp
+++ b/modules/gltf/extensions/gltf_spec_gloss.cpp
@@ -30,6 +30,8 @@
#include "gltf_spec_gloss.h"
+#include "core/io/image.h"
+
void GLTFSpecGloss::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_diffuse_img"), &GLTFSpecGloss::get_diffuse_img);
ClassDB::bind_method(D_METHOD("set_diffuse_img", "diffuse_img"), &GLTFSpecGloss::set_diffuse_img);
diff --git a/modules/gltf/extensions/gltf_spec_gloss.h b/modules/gltf/extensions/gltf_spec_gloss.h
index 2b4d3ee609..56474acd03 100644
--- a/modules/gltf/extensions/gltf_spec_gloss.h
+++ b/modules/gltf/extensions/gltf_spec_gloss.h
@@ -31,9 +31,10 @@
#ifndef GLTF_SPEC_GLOSS_H
#define GLTF_SPEC_GLOSS_H
-#include "core/io/image.h"
#include "core/io/resource.h"
+class Image;
+
// KHR_materials_pbrSpecularGlossiness is an archived GLTF extension.
// This means that it is deprecated and not recommended for new files.
// However, it is still supported for loading old files.