summaryrefslogtreecommitdiff
path: root/modules/gltf/gltf_skin.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-07-24 12:06:38 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-07-24 14:21:27 -0500
commit00ec9321f6f6e8a48b2bb3eaed5ac1d5bbe090fd (patch)
treea946e96c1ef97ed88300199be3b894587ad8c5de /modules/gltf/gltf_skin.cpp
parentb3df27526a0374f2fd5f44eab99da4b4bfd9f9ec (diff)
GLTF: Move shared defines into a separate gltf_defines.h file
Also move GLTFDocument's template conversion functions into gltf_template_convert.h
Diffstat (limited to 'modules/gltf/gltf_skin.cpp')
-rw-r--r--modules/gltf/gltf_skin.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/gltf/gltf_skin.cpp b/modules/gltf/gltf_skin.cpp
index e8005aa0c1..8b0ca7546c 100644
--- a/modules/gltf/gltf_skin.cpp
+++ b/modules/gltf/gltf_skin.cpp
@@ -30,6 +30,9 @@
#include "gltf_skin.h"
+#include "gltf_template_convert.h"
+#include "scene/resources/skin.h"
+
void GLTFSkin::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_skin_root"), &GLTFSkin::get_skin_root);
ClassDB::bind_method(D_METHOD("set_skin_root", "skin_root"), &GLTFSkin::set_skin_root);
@@ -81,11 +84,11 @@ void GLTFSkin::set_joints_original(Vector<GLTFNodeIndex> p_joints_original) {
}
Array GLTFSkin::get_inverse_binds() {
- return GLTFDocument::to_array(inverse_binds);
+ return GLTFTemplateConvert::to_array(inverse_binds);
}
void GLTFSkin::set_inverse_binds(Array p_inverse_binds) {
- GLTFDocument::set_from_array(inverse_binds, p_inverse_binds);
+ GLTFTemplateConvert::set_from_array(inverse_binds, p_inverse_binds);
}
Vector<GLTFNodeIndex> GLTFSkin::get_joints() {
@@ -121,11 +124,11 @@ void GLTFSkin::set_skeleton(int p_skeleton) {
}
Dictionary GLTFSkin::get_joint_i_to_bone_i() {
- return GLTFDocument::to_dict(joint_i_to_bone_i);
+ return GLTFTemplateConvert::to_dict(joint_i_to_bone_i);
}
void GLTFSkin::set_joint_i_to_bone_i(Dictionary p_joint_i_to_bone_i) {
- GLTFDocument::set_from_dict(joint_i_to_bone_i, p_joint_i_to_bone_i);
+ GLTFTemplateConvert::set_from_dict(joint_i_to_bone_i, p_joint_i_to_bone_i);
}
Dictionary GLTFSkin::get_joint_i_to_name() {