From 6b8088225a1d83339e05c6699d9249191e85a66d Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Thu, 14 Mar 2024 18:55:28 -0700 Subject: [PATCH] Fix for root bone being incorrectly oriented if it wasn't at the identity rotation in the bind pose --- io_scene_psk_psa/psa/importer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io_scene_psk_psa/psa/importer.py b/io_scene_psk_psa/psa/importer.py index aad193f..1a7ea18 100644 --- a/io_scene_psk_psa/psa/importer.py +++ b/io_scene_psk_psa/psa/importer.py @@ -199,7 +199,8 @@ def import_psa(context: Context, psa_reader: PsaReader, armature_object: Object, import_bone.original_rotation.conjugate() else: 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() context.window_manager.progress_begin(0, len(sequences))