glTF exporter: fix normals export

This commit is contained in:
Julien Duroure 2019-05-22 23:19:02 +02:00
parent 03ca934212
commit 067ccc71c2
2 changed files with 5 additions and 1 deletions

View File

@ -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": (0, 9, 10),
"version": (0, 9, 11),
'blender': (2, 80, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -392,6 +392,10 @@ def extract_primitives(glTF, blender_mesh, blender_vertex_groups, modifiers, exp
"""
print_console('INFO', 'Extracting primitive: ' + blender_mesh.name)
if blender_mesh.has_custom_normals:
# Custom normals are all (0, 0, 0) until calling calc_normals_split() or calc_tangents().
blender_mesh.calc_normals_split()
use_tangents = False
if blender_mesh.uv_layers.active and len(blender_mesh.uv_layers) > 0:
try: