522f035cb1
- GLBs produced by godot don't pass validation when there's no data in the buffer segment. The segment is dropped but the size of the chunk_header is still reported in total length (incorrectly) - Remove empty "extensions" JSON object being appended to all nodes (if it's still empty). This is just cutting down on unnecessary bloat and consistent with the rest of the file's attempts to not emit any keys that are equal to their default value. - Allow the case where root_nodes is empty. This is permitted by the GLTF spec. Moreover it can happen fairly naturally when using the ROOT_NODE_MODE_MULTI_ROOT root node mode on a scene with only a root node (which is valid in godot). - Don't create an initial buffer until we're ready to write data into it (buffers of byteLength=0 don't pass validation). |
||
---|---|---|
.. | ||
doc_classes | ||
editor | ||
extensions | ||
structures | ||
README.md | ||
SCsub | ||
config.py | ||
gltf_defines.h | ||
gltf_document.cpp | ||
gltf_document.h | ||
gltf_state.cpp | ||
gltf_state.h | ||
gltf_template_convert.h | ||
register_types.cpp | ||
register_types.h | ||
skin_tool.cpp | ||
skin_tool.h |
README.md
Godot GLTF import and export module
In a nutshell, the GLTF module works like this:
- The
structures/
folder contains GLTF structures, the small pieces that make up a GLTF file, represented as C++ classes. - The
extensions/
folder contains GLTF extensions, which are optional features that build on top of the base GLTF spec. GLTFState
holds collections of structures and extensions.GLTFDocument
operates on GLTFState and its elements.- The
editor/
folder uses GLTFDocument to import and export 3D models.