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-04 18:18:22 +0300
committerJulien Duroure <julien.duroure@gmail.com>2020-05-04 18:18:22 +0300
commitb42aecdca411acbf112b43ec1d4a6daa3df6a3a1 (patch)
tree5b3d7fe024ec04604467b5714ea1ddfe56de0935
parent0650f599aa174ea79c75bd4825696c1a9f56aeb2 (diff)
glTF exporter: normalize normals for skinned meshes
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_extract.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 1fa5b375..afa211ef 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, 2, 71),
+ "version": (1, 2, 72),
'blender': (2, 83, 9),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
index df0552cd..ae79f883 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
@@ -77,6 +77,7 @@ def convert_swizzle_normal(loc, armature, blender_object, export_settings):
apply_matrix = (armature.matrix_world.inverted() @ blender_object.matrix_world).to_3x3().inverted()
apply_matrix.transpose()
new_loc = ((armature.matrix_world.to_3x3() @ apply_matrix).to_4x4() @ Matrix.Translation(Vector((loc[0], loc[1], loc[2])))).to_translation()
+ new_loc.normalize()
if export_settings[gltf2_blender_export_keys.YUP]:
return Vector((new_loc[0], new_loc[2], -new_loc[1]))