Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-11-13 00:36:45 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-11-13 00:36:45 +0300
commitdc028195538333e53757957a45aee8aad212c11e (patch)
tree01056b97ed2d03250cadbe0835956b4e742db7c2 /io_scene_gltf2/io
parentfebdff331afd47d5c4c6d2ab3c64f3ea1610ad71 (diff)
glTF exporter: fix buffer size with Draco compression
Diffstat (limited to 'io_scene_gltf2/io')
-rw-r--r--io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py7
1 files changed, 7 insertions, 0 deletions
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 afbed4d5..fc65edbd 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
@@ -249,6 +249,13 @@ def __compress_primitive(primitive, dll, export_settings):
primitive.extensions['KHR_draco_mesh_compression'] = extension
+ # Remove buffer views from the accessors of the attributes which compressed.
+ attributes['POSITION'].buffer_view = None
+ if enable_normals:
+ attributes['NORMAL'].buffer_view = None
+ for tex_coord in tex_coord_attrs:
+ tex_coord.buffer_view = None
+
# Set to triangle list mode.
primitive.mode = 4