@@ -59,7 +59,7 @@ void GLTFDocumentExtension::_bind_methods() {
5959}
6060
6161// Import process.
62- Error GLTFDocumentExtension::import_preflight (Ref<GLTFState> p_state, Vector<String> p_extensions) {
62+ Error GLTFDocumentExtension::import_preflight (Ref<GLTFState> p_state, const Vector<String> & p_extensions) {
6363 ERR_FAIL_COND_V (p_state.is_null (), ERR_INVALID_PARAMETER);
6464 Error err = OK;
6565 GDVIRTUAL_CALL (_import_preflight, p_state, p_extensions, err);
@@ -72,11 +72,11 @@ Vector<String> GLTFDocumentExtension::get_supported_extensions() {
7272 return ret;
7373}
7474
75- Error GLTFDocumentExtension::parse_node_extensions (Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &p_extensions) {
75+ Error GLTFDocumentExtension::parse_node_extensions (Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, const Dictionary &p_extensions) {
7676 ERR_FAIL_COND_V (p_state.is_null (), ERR_INVALID_PARAMETER);
7777 ERR_FAIL_COND_V (p_gltf_node.is_null (), ERR_INVALID_PARAMETER);
7878 Error err = OK;
79- GDVIRTUAL_CALL (_parse_node_extensions, p_state, p_gltf_node, p_extensions, err);
79+ GDVIRTUAL_CALL (_parse_node_extensions, p_state, p_gltf_node, Dictionary ( p_extensions) , err);
8080 return err;
8181}
8282
@@ -98,7 +98,7 @@ Error GLTFDocumentExtension::parse_texture_json(Ref<GLTFState> p_state, const Di
9898 ERR_FAIL_COND_V (p_state.is_null (), ERR_INVALID_PARAMETER);
9999 ERR_FAIL_COND_V (r_gltf_texture.is_null (), ERR_INVALID_PARAMETER);
100100 Error err = OK;
101- GDVIRTUAL_CALL (_parse_texture_json, p_state, p_texture_json, r_gltf_texture, err);
101+ GDVIRTUAL_CALL (_parse_texture_json, p_state, Dictionary ( p_texture_json) , r_gltf_texture, err);
102102 return err;
103103}
104104
@@ -136,7 +136,7 @@ Error GLTFDocumentExtension::import_node(Ref<GLTFState> p_state, Ref<GLTFNode> p
136136 ERR_FAIL_COND_V (p_gltf_node.is_null (), ERR_INVALID_PARAMETER);
137137 ERR_FAIL_NULL_V (p_node, ERR_INVALID_PARAMETER);
138138 Error err = OK;
139- GDVIRTUAL_CALL (_import_node, p_state, p_gltf_node, r_dict, p_node, err);
139+ GDVIRTUAL_CALL (_import_node, p_state, p_gltf_node, Dictionary ( r_dict) , p_node, err);
140140 return err;
141141}
142142
@@ -193,11 +193,11 @@ Vector<String> GLTFDocumentExtension::get_saveable_image_formats() {
193193 return ret;
194194}
195195
196- PackedByteArray GLTFDocumentExtension::serialize_image_to_bytes (Ref<GLTFState> p_state, Ref<Image> p_image, Dictionary p_image_dict , const String &p_image_format, float p_lossy_quality) {
196+ PackedByteArray GLTFDocumentExtension::serialize_image_to_bytes (Ref<GLTFState> p_state, Ref<Image> p_image, Dictionary &r_image_dict , const String &p_image_format, float p_lossy_quality) {
197197 PackedByteArray ret;
198198 ERR_FAIL_COND_V (p_state.is_null (), ret);
199199 ERR_FAIL_COND_V (p_image.is_null (), ret);
200- GDVIRTUAL_CALL (_serialize_image_to_bytes, p_state, p_image, p_image_dict , p_image_format, p_lossy_quality, ret);
200+ GDVIRTUAL_CALL (_serialize_image_to_bytes, p_state, p_image, Dictionary (r_image_dict) , p_image_format, p_lossy_quality, ret);
201201 return ret;
202202}
203203
@@ -209,19 +209,19 @@ Error GLTFDocumentExtension::save_image_at_path(Ref<GLTFState> p_state, Ref<Imag
209209 return ret;
210210}
211211
212- Error GLTFDocumentExtension::serialize_texture_json (Ref<GLTFState> p_state, Dictionary p_texture_json , Ref<GLTFTexture> p_gltf_texture, const String &p_image_format) {
212+ Error GLTFDocumentExtension::serialize_texture_json (Ref<GLTFState> p_state, Dictionary &r_texture_json , Ref<GLTFTexture> p_gltf_texture, const String &p_image_format) {
213213 ERR_FAIL_COND_V (p_state.is_null (), ERR_INVALID_PARAMETER);
214214 ERR_FAIL_COND_V (p_gltf_texture.is_null (), ERR_INVALID_PARAMETER);
215215 Error err = OK;
216- GDVIRTUAL_CALL (_serialize_texture_json, p_state, p_texture_json , p_gltf_texture, p_image_format, err);
216+ GDVIRTUAL_CALL (_serialize_texture_json, p_state, Dictionary (r_texture_json) , p_gltf_texture, p_image_format, err);
217217 return err;
218218}
219219
220220Error GLTFDocumentExtension::export_node (Ref<GLTFState> p_state, Ref<GLTFNode> p_gltf_node, Dictionary &r_dict, Node *p_node) {
221221 ERR_FAIL_COND_V (p_state.is_null (), ERR_INVALID_PARAMETER);
222222 ERR_FAIL_COND_V (p_gltf_node.is_null (), ERR_INVALID_PARAMETER);
223223 Error err = OK;
224- GDVIRTUAL_CALL (_export_node, p_state, p_gltf_node, r_dict, p_node, err);
224+ GDVIRTUAL_CALL (_export_node, p_state, p_gltf_node, Dictionary ( r_dict) , p_node, err);
225225 return err;
226226}
227227
0 commit comments