From 7adc8376ed79f016730845ea3a93f4015b95149e Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 31 Aug 2022 19:24:04 +0200 Subject: Change Array arguments to TypedArray --- modules/gltf/doc_classes/GLTFMesh.xml | 2 +- modules/gltf/gltf_document.cpp | 2 +- modules/gltf/structures/gltf_mesh.cpp | 4 ++-- modules/gltf/structures/gltf_mesh.h | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/gltf') diff --git a/modules/gltf/doc_classes/GLTFMesh.xml b/modules/gltf/doc_classes/GLTFMesh.xml index bac351cc20..4d2df872ea 100644 --- a/modules/gltf/doc_classes/GLTFMesh.xml +++ b/modules/gltf/doc_classes/GLTFMesh.xml @@ -9,7 +9,7 @@ - + diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 0ed212e21f..926dbe6873 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -5007,7 +5007,7 @@ GLTFMeshIndex GLTFDocument::_convert_mesh_to_gltf(Ref state, MeshInst Ref gltf_mesh; gltf_mesh.instantiate(); - Array instance_materials; + TypedArray instance_materials; for (int32_t surface_i = 0; surface_i < current_mesh->get_surface_count(); surface_i++) { Ref mat = current_mesh->get_surface_material(surface_i); if (p_mesh_instance->get_surface_override_material(surface_i).is_valid()) { diff --git a/modules/gltf/structures/gltf_mesh.cpp b/modules/gltf/structures/gltf_mesh.cpp index 3add8304b1..3893f56626 100644 --- a/modules/gltf/structures/gltf_mesh.cpp +++ b/modules/gltf/structures/gltf_mesh.cpp @@ -53,11 +53,11 @@ void GLTFMesh::set_mesh(Ref p_mesh) { mesh = p_mesh; } -Array GLTFMesh::get_instance_materials() { +TypedArray GLTFMesh::get_instance_materials() { return instance_materials; } -void GLTFMesh::set_instance_materials(Array p_instance_materials) { +void GLTFMesh::set_instance_materials(TypedArray p_instance_materials) { instance_materials = p_instance_materials; } diff --git a/modules/gltf/structures/gltf_mesh.h b/modules/gltf/structures/gltf_mesh.h index dc26120b48..2fa37fd727 100644 --- a/modules/gltf/structures/gltf_mesh.h +++ b/modules/gltf/structures/gltf_mesh.h @@ -42,7 +42,7 @@ class GLTFMesh : public Resource { private: Ref mesh; Vector blend_weights; - Array instance_materials; + TypedArray instance_materials; protected: static void _bind_methods(); @@ -52,8 +52,8 @@ public: void set_mesh(Ref p_mesh); Vector get_blend_weights(); void set_blend_weights(Vector p_blend_weights); - Array get_instance_materials(); - void set_instance_materials(Array p_instance_materials); + TypedArray get_instance_materials(); + void set_instance_materials(TypedArray p_instance_materials); }; #endif // GLTF_MESH_H -- cgit v1.2.3