From 1241c4b6baeb2015e692dd7395cdfbaf2ef80c3d Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Fri, 2 Sep 2022 17:38:40 +0300 Subject: [PATCH] Revert usage of typed array in `add_surface_from_arrays` parameters --- doc/classes/ArrayMesh.xml | 2 +- scene/resources/mesh.cpp | 2 +- scene/resources/mesh.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 1161b5f617a..ab948dd0de4 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -60,7 +60,7 @@ - + diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index ee74834b0cd..b42e65c8df8 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1614,7 +1614,7 @@ void ArrayMesh::add_surface(uint32_t p_format, PrimitiveType p_primitive, const emit_changed(); } -void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const TypedArray &p_arrays, const TypedArray &p_blend_shapes, const Dictionary &p_lods, uint32_t p_flags) { +void ArrayMesh::add_surface_from_arrays(PrimitiveType p_primitive, const Array &p_arrays, const TypedArray &p_blend_shapes, const Dictionary &p_lods, uint32_t p_flags) { ERR_FAIL_COND(p_arrays.size() != ARRAY_MAX); RS::SurfaceData surface; diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index 5fb9dc92b46..5ed41641176 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -265,7 +265,7 @@ protected: static void _bind_methods(); public: - void add_surface_from_arrays(PrimitiveType p_primitive, const TypedArray &p_arrays, const TypedArray &p_blend_shapes = TypedArray(), const Dictionary &p_lods = Dictionary(), uint32_t p_flags = 0); + void add_surface_from_arrays(PrimitiveType p_primitive, const Array &p_arrays, const TypedArray &p_blend_shapes = TypedArray(), const Dictionary &p_lods = Dictionary(), uint32_t p_flags = 0); void add_surface(uint32_t p_format, PrimitiveType p_primitive, const Vector &p_array, const Vector &p_attribute_array, const Vector &p_skin_array, int p_vertex_count, const Vector &p_index_array, int p_index_count, const AABB &p_aabb, const Vector &p_blend_shape_data = Vector(), const Vector &p_bone_aabbs = Vector(), const Vector &p_lods = Vector());