Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py
index 1cb26551..dff55d17 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py
@@ -17,8 +17,6 @@ import mathutils
from . import gltf2_blender_export_keys
from io_scene_gltf2.blender.exp.gltf2_blender_gather_cache import cached
from io_scene_gltf2.io.com import gltf2_io
-from io_scene_gltf2.blender.exp import gltf2_blender_extract
-from io_scene_gltf2.blender.com import gltf2_blender_math
from io_scene_gltf2.blender.exp import gltf2_blender_gather_skins
from io_scene_gltf2.io.exp.gltf2_io_user_extensions import export_user_extensions
from ..com.gltf2_blender_extras import generate_extras
@@ -39,10 +37,12 @@ def gather_joint(blender_object, blender_bone, export_settings):
# extract bone transform
if blender_bone.parent is None:
- correction_matrix_local = gltf2_blender_math.multiply(axis_basis_change, blender_bone.bone.matrix_local)
+ correction_matrix_local = axis_basis_change @ blender_bone.bone.matrix_local
else:
- correction_matrix_local = gltf2_blender_math.multiply(
- blender_bone.parent.bone.matrix_local.inverted(), blender_bone.bone.matrix_local)
+ correction_matrix_local = (
+ blender_bone.parent.bone.matrix_local.inverted() @
+ blender_bone.bone.matrix_local
+ )
if (blender_bone.bone.use_inherit_rotation == False or blender_bone.bone.inherit_scale != "FULL") and blender_bone.parent != None:
rest_mat = (blender_bone.parent.bone.matrix_local.inverted_safe() @ blender_bone.bone.matrix_local)
@@ -51,8 +51,7 @@ def gather_joint(blender_object, blender_bone, export_settings):
matrix_basis = blender_bone.matrix
matrix_basis = blender_object.convert_space(pose_bone=blender_bone, matrix=matrix_basis, from_space='POSE', to_space='LOCAL')
- trans, rot, sca = gltf2_blender_extract.decompose_transition(
- gltf2_blender_math.multiply(correction_matrix_local, matrix_basis), export_settings)
+ trans, rot, sca = (correction_matrix_local @ matrix_basis).decompose()
translation, rotation, scale = (None, None, None)
if trans[0] != 0.0 or trans[1] != 0.0 or trans[2] != 0.0:
translation = [trans[0], trans[1], trans[2]]