diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2023-07-18 11:15:58 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2023-07-18 15:20:24 -0500 |
commit | e8906b5b80312dd03599813c1c99fc834d747699 (patch) | |
tree | b5a8d5a6e70c43f58fba526d15a43247560d18ed /modules/gltf/extensions/gltf_document_extension.cpp | |
parent | 8f175a8649fd5d83a8679651a2078ded496d61c0 (diff) | |
download | redot-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.cpp | 8 |
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); |