summaryrefslogtreecommitdiffstats
path: root/modules/gltf/gltf_document.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2023-07-18 11:15:58 -0500
committerAaron Franke <arnfranke@yahoo.com>2023-07-18 15:20:24 -0500
commite8906b5b80312dd03599813c1c99fc834d747699 (patch)
treeb5a8d5a6e70c43f58fba526d15a43247560d18ed /modules/gltf/gltf_document.cpp
parent8f175a8649fd5d83a8679651a2078ded496d61c0 (diff)
downloadredot-engine-e8906b5b80312dd03599813c1c99fc834d747699.tar.gz
Add export_preserialize to the GLTF export process
Diffstat (limited to 'modules/gltf/gltf_document.cpp')
-rw-r--r--modules/gltf/gltf_document.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index d828363e03..923bd6dd6a 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -115,6 +115,12 @@ Error GLTFDocument::_serialize(Ref<GLTFState> p_state, const String &p_path) {
p_state->buffers.push_back(Vector<uint8_t>());
}
+ for (Ref<GLTFDocumentExtension> ext : document_extensions) {
+ ERR_CONTINUE(ext.is_null());
+ Error err = ext->export_preserialize(p_state);
+ ERR_CONTINUE(err != OK);
+ }
+
/* STEP CONVERT MESH INSTANCES */
_convert_mesh_instances(p_state);