Ported: [3.x] GLTF: Organize structures and extensions into subfolders

- aaronfranke
d8aa3b32c9
This commit is contained in:
Relintai 2022-12-11 19:39:24 +01:00
parent ea67b36916
commit 60b8bbf1ae
31 changed files with 45 additions and 23 deletions

View File

@ -0,0 +1,10 @@
# GLTF import and export module
In a nutshell, the GLTF module works like this:
* The [`structures/`](structures/) folder contains GLTF structures, the
small pieces that make up a GLTF file, represented as C++ classes.
* The [`extensions/`](extensions/) folder contains GLTF extensions, which
are optional features that build on top of the base GLTF spec.
* [`GLTFState`](gltf_state.h) holds collections of structures and extensions.
* [`GLTFDocument`](gltf_document.h) operates on GLTFState and its elements.

View File

@ -7,3 +7,6 @@ env_gltf = env_modules.Clone()
# Pandemonium's own source files
env_gltf.add_source_files(env.modules_sources, "*.cpp")
env_gltf.add_source_files(env.modules_sources, "structures/*.cpp")
SConscript("extensions/SCsub")

View File

@ -0,0 +1,9 @@
#!/usr/bin/env python
Import("env")
Import("env_modules")
env_gltf = env_modules.Clone()
# Godot source files
env_gltf.add_source_files(env.modules_sources, "*.cpp")

View File

@ -30,6 +30,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "../gltf_defines.h"
#include "core/io/image.h"
#include "core/object/resource.h"

View File

@ -38,7 +38,7 @@
#include "modules/skeleton_3d/resources/skin.h"
#endif
#include "gltf_spec_gloss.h"
#include "extensions/gltf_spec_gloss.h"
#include "gltf_state.h"
#include "core/bind/core_bind.h" // FIXME: Shouldn't use _Directory but DirAccess.

View File

@ -39,8 +39,7 @@
#include "scene/resources/texture.h"
#include "gltf_defines.h"
#include "gltf_animation.h"
#include "structures/gltf_animation.h"
#include "modules/modules_enabled.gen.h" // For csg, gridmap.

View File

@ -30,18 +30,18 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "gltf_accessor.h"
#include "gltf_animation.h"
#include "gltf_buffer_view.h"
#include "gltf_camera.h"
#include "gltf_light.h"
#include "gltf_mesh.h"
#include "gltf_node.h"
#include "gltf_skeleton.h"
#include "gltf_skin.h"
#include "extensions/gltf_light.h"
#include "gltf_template_convert.h"
#include "gltf_texture.h"
#include "gltf_texture_sampler.h"
#include "structures/gltf_accessor.h"
#include "structures/gltf_animation.h"
#include "structures/gltf_buffer_view.h"
#include "structures/gltf_camera.h"
#include "structures/gltf_mesh.h"
#include "structures/gltf_node.h"
#include "structures/gltf_skin.h"
#include "structures/gltf_texture.h"
#include "structures/gltf_texture_sampler.h"
#include "structures/gltf_skeleton.h"
class GLTFState : public Resource {
GDCLASS(GLTFState, Resource);

View File

@ -32,7 +32,7 @@
#include "register_types.h"
#include "gltf_spec_gloss.h"
#include "extensions/gltf_spec_gloss.h"
#include "gltf_state.h"
#ifdef TOOLS_ENABLED

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "gltf_defines.h"
#include "../gltf_defines.h"
struct GLTFAccessor : public Resource {
GDCLASS(GLTFAccessor, Resource);

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "gltf_defines.h"
#include "../gltf_defines.h"
class GLTFBufferView : public Resource {
GDCLASS(GLTFBufferView, Resource);

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "gltf_defines.h"
#include "../gltf_defines.h"
class GLTFNode : public Resource {
GDCLASS(GLTFNode, Resource);

View File

@ -30,7 +30,7 @@
#include "gltf_skeleton.h"
#include "gltf_template_convert.h"
#include "../gltf_template_convert.h"
#ifdef MODULE_SKELETON_3D_ENABLED
#include "modules/skeleton_3d/nodes/bone_attachment.h"

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "gltf_defines.h"
#include "../gltf_defines.h"
#include "modules/modules_enabled.gen.h"

View File

@ -32,7 +32,7 @@
#include "modules/modules_enabled.gen.h"
#include "gltf_template_convert.h"
#include "../gltf_template_convert.h"
#ifdef MODULE_SKELETON_3D_ENABLED
#include "modules/skeleton_3d/resources/skin.h"

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "gltf_defines.h"
#include "../gltf_defines.h"
#include "modules/modules_enabled.gen.h"

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "gltf_defines.h"
#include "../gltf_defines.h"
class GLTFTexture : public Resource {
GDCLASS(GLTFTexture, Resource);