1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2024-09-24 02:58:23 +02:00

Fix for root bone being incorrectly oriented if it wasn't at the identity rotation in the bind pose

This commit is contained in:
Colin Basnett 2024-03-14 18:55:28 -07:00
parent bd667d4833
commit d996f59cae

View File

@ -153,7 +153,8 @@ def import_psa(context: Context, psa_reader: PsaReader, armature_object: Object,
import_bone.original_rotation.conjugate() import_bone.original_rotation.conjugate()
else: else:
import_bone.original_location = armature_bone.matrix_local.translation.copy() import_bone.original_location = armature_bone.matrix_local.translation.copy()
import_bone.original_rotation = armature_bone.matrix_local.to_quaternion() import_bone.original_rotation = armature_bone.matrix_local.to_quaternion().conjugated()
import_bone.post_rotation = import_bone.original_rotation.conjugated() import_bone.post_rotation = import_bone.original_rotation.conjugated()
context.window_manager.progress_begin(0, len(sequences)) context.window_manager.progress_begin(0, len(sequences))