summaryrefslogtreecommitdiff
path: root/modules/gltf/extensions
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-12-11 00:27:57 -0600
committerAaron Franke <arnfranke@yahoo.com>2022-12-11 13:22:25 -0600
commitf83f13f3a202c61b6dfb682f17dafb1c2fdcc368 (patch)
tree508c79c624ecaa729fd4c5cf69a209c142152a26 /modules/gltf/extensions
parent05097ded0a915cd6c083f15dab08da2bdc0770b8 (diff)
Pass GLTFState to the export_preflight method
Diffstat (limited to 'modules/gltf/extensions')
-rw-r--r--modules/gltf/extensions/gltf_document_extension.cpp6
-rw-r--r--modules/gltf/extensions/gltf_document_extension.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/gltf/extensions/gltf_document_extension.cpp b/modules/gltf/extensions/gltf_document_extension.cpp
index f997fe8f66..630a62ba5c 100644
--- a/modules/gltf/extensions/gltf_document_extension.cpp
+++ b/modules/gltf/extensions/gltf_document_extension.cpp
@@ -40,7 +40,7 @@ void GLTFDocumentExtension::_bind_methods() {
GDVIRTUAL_BIND(_import_node, "state", "gltf_node", "json", "node");
GDVIRTUAL_BIND(_import_post, "state", "root");
// Export process.
- GDVIRTUAL_BIND(_export_preflight, "root");
+ GDVIRTUAL_BIND(_export_preflight, "state", "root");
GDVIRTUAL_BIND(_convert_scene_node, "state", "gltf_node", "scene_node");
GDVIRTUAL_BIND(_export_node, "state", "gltf_node", "json", "node");
GDVIRTUAL_BIND(_export_post, "state");
@@ -102,10 +102,10 @@ Error GLTFDocumentExtension::import_post(Ref<GLTFState> p_state, Node *p_root) {
}
// Export process.
-Error GLTFDocumentExtension::export_preflight(Node *p_root) {
+Error GLTFDocumentExtension::export_preflight(Ref<GLTFState> p_state, Node *p_root) {
ERR_FAIL_NULL_V(p_root, ERR_INVALID_PARAMETER);
int err = OK;
- GDVIRTUAL_CALL(_export_preflight, p_root, err);
+ GDVIRTUAL_CALL(_export_preflight, p_state, p_root, err);
return Error(err);
}
diff --git a/modules/gltf/extensions/gltf_document_extension.h b/modules/gltf/extensions/gltf_document_extension.h
index 7cc9ca592f..66cb9a3c33 100644
--- a/modules/gltf/extensions/gltf_document_extension.h
+++ b/modules/gltf/extensions/gltf_document_extension.h
@@ -49,7 +49,7 @@ public:
virtual Error import_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &r_json, Node *p_node);
virtual Error import_post(Ref<GLTFState> p_state, Node *p_node);
// Export process.
- virtual Error export_preflight(Node *p_state);
+ virtual Error export_preflight(Ref<GLTFState> p_state, Node *p_root);
virtual void convert_scene_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Node *p_scene_node);
virtual Error export_node(Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &r_json, Node *p_node);
virtual Error export_post(Ref<GLTFState> p_state);
@@ -63,7 +63,7 @@ public:
GDVIRTUAL4R(int, _import_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
GDVIRTUAL2R(int, _import_post, Ref<GLTFState>, Node *);
// Export process.
- GDVIRTUAL1R(int, _export_preflight, Node *);
+ GDVIRTUAL2R(int, _export_preflight, Ref<GLTFState>, Node *);
GDVIRTUAL3(_convert_scene_node, Ref<GLTFState>, Ref<GLTFNode>, Node *);
GDVIRTUAL4R(int, _export_node, Ref<GLTFState>, Ref<GLTFNode>, Dictionary, Node *);
GDVIRTUAL1R(int, _export_post, Ref<GLTFState>);