diff options
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_skin.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 3a048afe..eb7e130c 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -15,7 +15,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (1, 1, 6), + "version": (1, 1, 7), 'blender': (2, 81, 6), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_skin.py b/io_scene_gltf2/blender/imp/gltf2_blender_skin.py index 9c8cd168..0f512188 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_skin.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_skin.py @@ -96,10 +96,10 @@ class BlenderSkin(): obj.pose.bones[pynode.blender_bone_name].location = \ bind_rotation.inverted().to_matrix().to_4x4() @ final_location - # Do the same for rotation + # Do the same for rotation & scale obj.pose.bones[pynode.blender_bone_name].rotation_quaternion = \ - (bind_rotation.to_matrix().to_4x4().inverted() @ parent_mat @ - rotation.to_matrix().to_4x4()).to_quaternion() + (pynode.blender_bone_matrix.inverted() @ parent_mat @ + matrix_gltf_to_blender(pynode.transform)).to_quaternion() obj.pose.bones[pynode.blender_bone_name].scale = \ (bind_scale.inverted() @ parent_mat @ scale_to_matrix(scale)).to_scale() |