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>2021-02-25 21:08:53 +0300
committerJulien Duroure <julien.duroure@gmail.com>2021-02-25 21:08:53 +0300
commit8d24537a6e9c6e39f7d18d1bf3f4d162a85edd11 (patch)
treefb99c9635d5f902e4fb5b2853a143d0c2b6f8882 /io_scene_gltf2/io
parent37af7e130b99865575f1fa2315ef806f815b0f42 (diff)
gltf exporter: new feature: export 'Loose Points' and 'Loose Edges'
Diffstat (limited to 'io_scene_gltf2/io')
-rw-r--r--io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py6
1 files changed, 5 insertions, 1 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 0c6bfaf4..74dbfa03 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
@@ -1,4 +1,4 @@
-# Copyright 2018-2019 The glTF-Blender-IO authors.
+# Copyright 2018-2021 The glTF-Blender-IO authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -85,6 +85,10 @@ def __encode_primitive(primitive, dll, export_settings):
attributes = primitive.attributes
indices = primitive.indices
+ # Only do TRIANGLES primitives
+ if primitive.mode not in [None, 4]:
+ return
+
if 'POSITION' not in attributes:
print_console('WARNING', 'Draco encoder: Primitive without positions encountered. Skipping.')
return