diff options
author | Lyuma <xn.lyuma@gmail.com> | 2020-08-24 23:30:23 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2020-08-25 01:17:39 -0700 |
commit | 0851d6dcdf489738adefdace52936b7cbda0ee65 (patch) | |
tree | c330670077d7498f3660e321ca55a164c1d7993a /modules/assimp/editor_scene_importer_assimp.cpp | |
parent | 443686d724ce8ac58dcdf09389e9f996aee866c1 (diff) |
Fix regression in FBX import caused by Skeleton3D
A change in commit f7fdc87 changed the Skeleton3D "pose" property from PROPERTY_USAGE_EDITOR to PROPERTY_USAGE_NOEDITOR.
This should have had no effect, however it turns out assimp was assigning to the pose property.
This change adjusts the FBX import to only get_bone_rest/set_bone_rest, not set_bone_pose.
Diffstat (limited to 'modules/assimp/editor_scene_importer_assimp.cpp')
-rw-r--r-- | modules/assimp/editor_scene_importer_assimp.cpp | 3 |
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(); |