diff options
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 1b581b8c..7e8f9abf 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, 1, 28), + "version": (1, 1, 29), 'blender': (2, 81, 6), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py b/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py index a8554efc..9189be58 100644 --- a/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py +++ b/io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py @@ -206,6 +206,12 @@ def __compress_primitive(primitive, dll, export_settings): return positions = attributes['POSITION'] + + # Skip nodes without a position buffer. + # This happens with Blender instances, i.e. multiple nodes sharing the same mesh. + if attributes['POSITION'].buffer_view is None: + return + normals = attributes['NORMAL'] if 'NORMAL' in attributes else None uvs = [attributes[attr] for attr in attributes if attr.startswith('TEXCOORD_')] weights = [attributes[attr] for attr in attributes if attr.startswith('WEIGHTS_')] |