summaryrefslogtreecommitdiffstats
path: root/modules/gltf/extensions/gltf_document_extension.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/extensions/gltf_document_extension.cpp
parent8f175a8649fd5d83a8679651a2078ded496d61c0 (diff)
downloadredot-engine-e8906b5b80312dd03599813c1c99fc834d747699.tar.gz
Add export_preserialize to the GLTF export process
Diffstat (limited to 'modules/gltf/extensions/gltf_document_extension.cpp')
-rw-r--r--modules/gltf/extensions/gltf_document_extension.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gltf/extensions/gltf_document_extension.cpp b/modules/gltf/extensions/gltf_document_extension.cpp
index 2804a8b0a2..bd9404774a 100644
--- a/modules/gltf/extensions/gltf_document_extension.cpp
+++ b/modules/gltf/extensions/gltf_document_extension.cpp
@@ -44,6 +44,7 @@ void GLTFDocumentExtension::_bind_methods() {
// Export process.
GDVIRTUAL_BIND(_export_preflight, "state", "root");
GDVIRTUAL_BIND(_convert_scene_node, "state", "gltf_node", "scene_node");
+ GDVIRTUAL_BIND(_export_preserialize, "state");
GDVIRTUAL_BIND(_export_node, "state", "gltf_node", "json", "node");
GDVIRTUAL_BIND(_export_post, "state");
}
@@ -134,6 +135,13 @@ void GLTFDocumentExtension::convert_scene_node(Ref<GLTFState> p_state, Ref<GLTFN
GDVIRTUAL_CALL(_convert_scene_node, p_state, p_gltf_node, p_scene_node);
}
+Error GLTFDocumentExtension::export_preserialize(Ref<GLTFState> p_state) {
+ ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
+ Error err = OK;
+ GDVIRTUAL_CALL(_export_preserialize, p_state, err);
+ return err;
+}
+
Error GLTFDocumentExtension::export_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &r_dict, Node *p_node) {
ERR_FAIL_NULL_V(p_state, ERR_INVALID_PARAMETER);
ERR_FAIL_NULL_V(p_gltf_node, ERR_INVALID_PARAMETER);