mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-21 16:37:20 +01:00
Ported: [3.x] GLTF: Organize structures and extensions into subfolders
- aaronfranke
d8aa3b32c9
This commit is contained in:
parent
ea67b36916
commit
60b8bbf1ae
10
editor_modules/gltf/README.md
Normal file
10
editor_modules/gltf/README.md
Normal 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.
|
@ -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")
|
||||
|
9
editor_modules/gltf/extensions/SCsub
Normal file
9
editor_modules/gltf/extensions/SCsub
Normal 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")
|
@ -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"
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/object/resource.h"
|
||||
|
||||
#include "gltf_defines.h"
|
||||
#include "../gltf_defines.h"
|
||||
|
||||
struct GLTFAccessor : public Resource {
|
||||
GDCLASS(GLTFAccessor, Resource);
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/object/resource.h"
|
||||
|
||||
#include "gltf_defines.h"
|
||||
#include "../gltf_defines.h"
|
||||
|
||||
class GLTFBufferView : public Resource {
|
||||
GDCLASS(GLTFBufferView, Resource);
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/object/resource.h"
|
||||
|
||||
#include "gltf_defines.h"
|
||||
#include "../gltf_defines.h"
|
||||
|
||||
class GLTFNode : public Resource {
|
||||
GDCLASS(GLTFNode, Resource);
|
@ -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"
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/object/resource.h"
|
||||
|
||||
#include "gltf_defines.h"
|
||||
#include "../gltf_defines.h"
|
||||
|
||||
#include "modules/modules_enabled.gen.h"
|
||||
|
@ -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"
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/object/resource.h"
|
||||
|
||||
#include "gltf_defines.h"
|
||||
#include "../gltf_defines.h"
|
||||
|
||||
#include "modules/modules_enabled.gen.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#include "core/object/resource.h"
|
||||
|
||||
#include "gltf_defines.h"
|
||||
#include "../gltf_defines.h"
|
||||
|
||||
class GLTFTexture : public Resource {
|
||||
GDCLASS(GLTFTexture, Resource);
|
Loading…
Reference in New Issue
Block a user