Merge pull request #41497 from lyuma/assimp_set_pose_fix
Fix regression in FBX import caused by Skeleton3D
This commit is contained in:
commit
e968109fa7
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user