diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-05-23 00:19:02 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-05-23 00:19:02 +0300 |
commit | 067ccc71c20dbe3ac82fd47364c632d5a8c760b3 (patch) | |
tree | f655d1fe3cba517f521937e75dc8efdb13bbb985 /io_scene_gltf2/blender | |
parent | 03ca9342122a3f22fb83384dd500c5b1b8f102ae (diff) |
glTF exporter: fix normals export
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_extract.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py index 9cd6b177..4c6d2555 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py @@ -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: |