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-07-01 07:30:32 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-07-04 09:51:28 +0300
commit9c39b79cdcadf7ea700c92bc4f641138a6ff03e1 (patch)
treee3c2c7683b2dd692cf587016ccd29739927de18c
parent9b0f1dbde817501a257deb7e040b8947c9c926bf (diff)
glTF exporter: Fix T99306 : Fix camera & light export when Yup is offv3.2.2v3.2.1blender-v3.2-release
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py10
2 files changed, 9 insertions, 3 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 8e21a943..790ba353 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, 42),
+ "version": (3, 2, 43),
'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 ba63e049..0377a6b7 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
@@ -163,10 +163,16 @@ class VExportTree:
# So real world matrix is collection world_matrix @ "world_matrix" of object
node.matrix_world = parent_coll_matrix_world @ blender_object.matrix_world.copy()
if node.blender_type == VExportNode.CAMERA and self.export_settings[gltf2_blender_export_keys.CAMERAS]:
- correction = Quaternion((2**0.5/2, -2**0.5/2, 0.0, 0.0))
+ if self.export_settings[gltf2_blender_export_keys.YUP]:
+ correction = Quaternion((2**0.5/2, -2**0.5/2, 0.0, 0.0))
+ else:
+ correction = Matrix.Identity(4).to_quaternion()
node.matrix_world @= correction.to_matrix().to_4x4()
elif node.blender_type == VExportNode.LIGHT and self.export_settings[gltf2_blender_export_keys.LIGHTS]:
- correction = Quaternion((2**0.5/2, -2**0.5/2, 0.0, 0.0))
+ if self.export_settings[gltf2_blender_export_keys.YUP]:
+ correction = Quaternion((2**0.5/2, -2**0.5/2, 0.0, 0.0))
+ else:
+ correction = Matrix.Identity(4).to_quaternion()
node.matrix_world @= correction.to_matrix().to_4x4()
elif node.blender_type == VExportNode.BONE:
if self.export_settings['gltf_current_frame'] is True: