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:
authorJulien Duroure <julien.duroure@gmail.com>2022-04-03 11:21:25 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-04-03 11:21:25 +0300
commitdfe74f0a1b1bc19a943e300ad86393dcd5a82836 (patch)
treeed407e09d71aa124f7fcb0f1fc6816e87f334e63
parentb294d4c7665469643b428950b189541699980cfe (diff)
glTF export: fix bone export when Yup is off
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index ec6ac40a..9d9d13b0 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -4,7 +4,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (3, 2, 23),
+ "version": (3, 2, 24),
'blender': (3, 1, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
index cf4983e1..e629a963 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
@@ -170,8 +170,10 @@ class VExportTree:
node.matrix_world @= correction.to_matrix().to_4x4()
elif node.blender_type == VExportNode.BONE:
node.matrix_world = self.nodes[node.armature].matrix_world @ blender_bone.matrix
- axis_basis_change = Matrix(
- ((1.0, 0.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0), (0.0, -1.0, 0.0, 0.0), (0.0, 0.0, 0.0, 1.0)))
+ axis_basis_change = Matrix.Identity(4)
+ if self.export_settings[gltf2_blender_export_keys.YUP]:
+ axis_basis_change = Matrix(
+ ((1.0, 0.0, 0.0, 0.0), (0.0, 0.0, 1.0, 0.0), (0.0, -1.0, 0.0, 0.0), (0.0, 0.0, 0.0, 1.0)))
node.matrix_world = node.matrix_world @ axis_basis_change
# Force empty ?