glTF exporter: fix normals export
This commit is contained in:
parent
03ca934212
commit
067ccc71c2
|
@ -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',
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue