diff options
Diffstat (limited to 'modules/gltf/structures')
-rw-r--r-- | modules/gltf/structures/gltf_skeleton.cpp | 4 | ||||
-rw-r--r-- | modules/gltf/structures/gltf_skeleton.h | 4 | ||||
-rw-r--r-- | modules/gltf/structures/gltf_skin.cpp | 5 | ||||
-rw-r--r-- | modules/gltf/structures/gltf_skin.h | 7 |
4 files changed, 12 insertions, 8 deletions
diff --git a/modules/gltf/structures/gltf_skeleton.cpp b/modules/gltf/structures/gltf_skeleton.cpp index 90a6b0f50f..0073357eda 100644 --- a/modules/gltf/structures/gltf_skeleton.cpp +++ b/modules/gltf/structures/gltf_skeleton.cpp @@ -72,11 +72,11 @@ Skeleton3D *GLTFSkeleton::get_godot_skeleton() { return godot_skeleton; } -Array GLTFSkeleton::get_unique_names() { +TypedArray<String> GLTFSkeleton::get_unique_names() { return GLTFTemplateConvert::to_array(unique_names); } -void GLTFSkeleton::set_unique_names(Array p_unique_names) { +void GLTFSkeleton::set_unique_names(TypedArray<String> p_unique_names) { GLTFTemplateConvert::set_from_array(unique_names, p_unique_names); } diff --git a/modules/gltf/structures/gltf_skeleton.h b/modules/gltf/structures/gltf_skeleton.h index db88623213..0f20b493b6 100644 --- a/modules/gltf/structures/gltf_skeleton.h +++ b/modules/gltf/structures/gltf_skeleton.h @@ -75,8 +75,8 @@ public: // this->godot_skeleton = p_godot_skeleton; // } - Array get_unique_names(); - void set_unique_names(Array p_unique_names); + TypedArray<String> get_unique_names(); + void set_unique_names(TypedArray<String> p_unique_names); //RBMap<int32_t, GLTFNodeIndex> get_godot_bone_node() { // return this->godot_bone_node; diff --git a/modules/gltf/structures/gltf_skin.cpp b/modules/gltf/structures/gltf_skin.cpp index 2e46ee3be2..9717a66048 100644 --- a/modules/gltf/structures/gltf_skin.cpp +++ b/modules/gltf/structures/gltf_skin.cpp @@ -31,6 +31,7 @@ #include "gltf_skin.h" #include "../gltf_template_convert.h" +#include "core/variant/typed_array.h" #include "scene/resources/skin.h" void GLTFSkin::_bind_methods() { @@ -83,11 +84,11 @@ void GLTFSkin::set_joints_original(Vector<GLTFNodeIndex> p_joints_original) { joints_original = p_joints_original; } -Array GLTFSkin::get_inverse_binds() { +TypedArray<Transform3D> GLTFSkin::get_inverse_binds() { return GLTFTemplateConvert::to_array(inverse_binds); } -void GLTFSkin::set_inverse_binds(Array p_inverse_binds) { +void GLTFSkin::set_inverse_binds(TypedArray<Transform3D> p_inverse_binds) { GLTFTemplateConvert::set_from_array(inverse_binds, p_inverse_binds); } diff --git a/modules/gltf/structures/gltf_skin.h b/modules/gltf/structures/gltf_skin.h index 59b6a300ac..1a4d54b380 100644 --- a/modules/gltf/structures/gltf_skin.h +++ b/modules/gltf/structures/gltf_skin.h @@ -34,6 +34,9 @@ #include "../gltf_defines.h" #include "core/io/resource.h" +template <typename T> +class TypedArray; + class GLTFSkin : public Resource { GDCLASS(GLTFSkin, Resource); friend class GLTFDocument; @@ -82,8 +85,8 @@ public: Vector<GLTFNodeIndex> get_joints_original(); void set_joints_original(Vector<GLTFNodeIndex> p_joints_original); - Array get_inverse_binds(); - void set_inverse_binds(Array p_inverse_binds); + TypedArray<Transform3D> get_inverse_binds(); + void set_inverse_binds(TypedArray<Transform3D> p_inverse_binds); Vector<GLTFNodeIndex> get_joints(); void set_joints(Vector<GLTFNodeIndex> p_joints); |