1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2025-02-01 03:55:44 +01:00

Replaced explicit quaternion conjugation with call to conjugated function

This commit is contained in:
Colin Basnett 2022-06-27 18:12:21 -07:00
parent 4937f8f779
commit 7c9d13686f

View File

@ -96,10 +96,7 @@ def build_psk(context, options: PskBuildOptions) -> Psk:
psk_bone.parent_index = 0
if bone.parent is not None:
rotation = bone.matrix.to_quaternion()
rotation.x = -rotation.x
rotation.y = -rotation.y
rotation.z = -rotation.z
rotation = bone.matrix.to_quaternion().conjugated()
quat_parent = bone.parent.matrix.to_quaternion().inverted()
parent_head = quat_parent @ bone.parent.head
parent_tail = quat_parent @ bone.parent.tail