diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2021-09-15 18:36:15 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2021-09-15 18:36:15 +0300 |
commit | 5bffedce241f04dc57374ea86f9701e1fddff47f (patch) | |
tree | d339e7c19adfa4a5557889d367c15a256f4b37a0 /io_scene_gltf2/blender | |
parent | 29c9aa34754494bc478a08f0be60f38f4844a83d (diff) |
glTF exporter: validate meshes before export
(removing NaN for example)
Diffstat (limited to 'io_scene_gltf2/blender')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 a2fc57be..dc45ebbe 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py @@ -292,6 +292,9 @@ def __gather_mesh(blender_object, library, export_settings): if blender_object.type != "MESH": return None + # Be sure that object is valid (no NaN for example) + blender_object.data.validate() + # If not using vertex group, they are irrelevant for caching --> ensure that they do not trigger a cache miss vertex_groups = blender_object.vertex_groups modifiers = blender_object.modifiers |