summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-08-25 12:08:58 +0200
committerGitHub <noreply@github.com>2020-08-25 12:08:58 +0200
commite968109fa7f105f21ca0158c9cc474781406bb43 (patch)
treec330670077d7498f3660e321ca55a164c1d7993a /modules
parent443686d724ce8ac58dcdf09389e9f996aee866c1 (diff)
parent0851d6dcdf489738adefdace52936b7cbda0ee65 (diff)
Merge pull request #41497 from lyuma/assimp_set_pose_fix
Fix regression in FBX import caused by Skeleton3D
Diffstat (limited to 'modules')
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index aedc4b690a..e5becfd559 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -441,7 +441,6 @@ EditorSceneImporterAssimp::_generate_scene(const String &p_path, aiScene *scene,
Transform pform = AssimpUtils::assimp_matrix_transform(bone->mNode->mTransformation);
skeleton->add_bone(bone_name);
skeleton->set_bone_rest(boneIdx, pform);
- skeleton->set_bone_pose(boneIdx, pform);
if (parent_node != nullptr) {
int parent_bone_id = skeleton->find_bone(AssimpUtils::get_anim_string_from_assimp(parent_node->mName));
@@ -612,7 +611,7 @@ void EditorSceneImporterAssimp::_insert_animation_track(ImportState &scene, cons
xform.basis.set_quat_scale(rot, scale);
xform.origin = pos;
- xform = skeleton->get_bone_pose(skeleton_bone).inverse() * xform;
+ xform = skeleton->get_bone_rest(skeleton_bone).inverse() * xform;
rot = xform.basis.get_rotation_quat();
rot.normalize();