GLTF: Organize structures into a subfolder

This commit is contained in:
Aaron Franke 2022-07-24 14:20:50 -05:00
parent a1f0ea5d19
commit 7b8f9a0e8e
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
29 changed files with 46 additions and 33 deletions

11
modules/gltf/README.md Normal file
View file

@ -0,0 +1,11 @@
# Godot 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.
* The [`editor/`](editor/) folder uses GLTFDocument to import and export 3D models.

View file

@ -7,5 +7,7 @@ env_gltf = env_modules.Clone()
# Godot's own source files
env_gltf.add_source_files(env.modules_sources, "*.cpp")
env_gltf.add_source_files(env.modules_sources, "extensions/*.cpp")
env_gltf.add_source_files(env.modules_sources, "structures/*.cpp")
if env["tools"]:
env_gltf.add_source_files(env.modules_sources, "editor/*.cpp")

View file

@ -30,9 +30,9 @@
#include "gltf_document.h"
#include "extensions/gltf_spec_gloss.h"
#include "gltf_document_extension.h"
#include "gltf_document_extension_convert_importer_mesh.h"
#include "gltf_spec_gloss.h"
#include "gltf_state.h"
#include "core/crypto/crypto_core.h"

View file

@ -31,8 +31,8 @@
#ifndef GLTF_DOCUMENT_H
#define GLTF_DOCUMENT_H
#include "gltf_animation.h"
#include "gltf_defines.h"
#include "structures/gltf_animation.h"
#include "scene/3d/bone_attachment_3d.h"
#include "scene/3d/importer_mesh_instance_3d.h"

View file

@ -31,8 +31,8 @@
#ifndef GLTF_DOCUMENT_EXTENSION_H
#define GLTF_DOCUMENT_EXTENSION_H
#include "gltf_node.h"
#include "gltf_state.h"
#include "structures/gltf_node.h"
class GLTFDocumentExtension : public Resource {
GDCLASS(GLTFDocumentExtension, Resource);

View file

@ -31,17 +31,17 @@
#ifndef GLTF_STATE_H
#define GLTF_STATE_H
#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 "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_skeleton.h"
#include "structures/gltf_skin.h"
#include "structures/gltf_texture.h"
#include "core/templates/rb_map.h"
#include "scene/animation/animation_player.h"

View file

@ -32,21 +32,21 @@
#ifndef _3D_DISABLED
#include "gltf_accessor.h"
#include "gltf_animation.h"
#include "gltf_buffer_view.h"
#include "gltf_camera.h"
#include "extensions/gltf_light.h"
#include "extensions/gltf_spec_gloss.h"
#include "gltf_document.h"
#include "gltf_document_extension.h"
#include "gltf_document_extension_convert_importer_mesh.h"
#include "gltf_light.h"
#include "gltf_mesh.h"
#include "gltf_node.h"
#include "gltf_skeleton.h"
#include "gltf_skin.h"
#include "gltf_spec_gloss.h"
#include "gltf_state.h"
#include "gltf_texture.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_skeleton.h"
#include "structures/gltf_skin.h"
#include "structures/gltf_texture.h"
#ifdef TOOLS_ENABLED
#include "core/config/project_settings.h"

View file

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

View file

@ -30,7 +30,7 @@
#include "gltf_buffer_view.h"
#include "gltf_document_extension.h"
#include "../gltf_document_extension.h"
void GLTFBufferView::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_buffer"), &GLTFBufferView::get_buffer);

View file

@ -31,8 +31,8 @@
#ifndef GLTF_BUFFER_VIEW_H
#define GLTF_BUFFER_VIEW_H
#include "../gltf_defines.h"
#include "core/io/resource.h"
#include "gltf_defines.h"
class GLTFBufferView : public Resource {
GDCLASS(GLTFBufferView, Resource);

View file

@ -31,8 +31,8 @@
#ifndef GLTF_NODE_H
#define GLTF_NODE_H
#include "../gltf_defines.h"
#include "core/io/resource.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"
#include "scene/3d/bone_attachment_3d.h"
void GLTFSkeleton::_bind_methods() {

View file

@ -31,8 +31,8 @@
#ifndef GLTF_SKELETON_H
#define GLTF_SKELETON_H
#include "../gltf_defines.h"
#include "core/io/resource.h"
#include "gltf_defines.h"
class GLTFSkeleton : public Resource {
GDCLASS(GLTFSkeleton, Resource);

View file

@ -30,7 +30,7 @@
#include "gltf_skin.h"
#include "gltf_template_convert.h"
#include "../gltf_template_convert.h"
#include "scene/resources/skin.h"
void GLTFSkin::_bind_methods() {

View file

@ -31,8 +31,8 @@
#ifndef GLTF_SKIN_H
#define GLTF_SKIN_H
#include "../gltf_defines.h"
#include "core/io/resource.h"
#include "gltf_defines.h"
class GLTFSkin : public Resource {
GDCLASS(GLTFSkin, Resource);

View file

@ -31,8 +31,8 @@
#ifndef GLTF_TEXTURE_H
#define GLTF_TEXTURE_H
#include "../gltf_defines.h"
#include "core/io/resource.h"
#include "gltf_defines.h"
class GLTFTexture : public Resource {
GDCLASS(GLTFTexture, Resource);