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>2020-05-12 19:45:58 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-05-12 19:45:58 +0300
commitfac4c6443ba7da392ac26ad436513764f2ece290 (patch)
treea55e5846dfcfaa7ca9d18b6c42c6885278f6a94f
parent72227fc13ba354695244a600b0d8b6a0b5d6f460 (diff)
glTF exporter: make sure rotation are normalized
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 2825fa3c..5a283201 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, 3, 15),
+ "version": (1, 3, 16),
'blender': (2, 90, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
index 548c5299..d477bcbb 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
@@ -369,6 +369,9 @@ def __gather_trans_rot_scale(blender_object, export_settings):
rot = blender_object.rotation_euler.to_quaternion()
sca = blender_object.scale
+ # make sure the rotation is normalized
+ rot.normalize()
+
trans = gltf2_blender_extract.convert_swizzle_location(trans, None, None, export_settings)
rot = gltf2_blender_extract.convert_swizzle_rotation(rot, export_settings)
sca = gltf2_blender_extract.convert_swizzle_scale(sca, export_settings)