[Bf-extensions-cvs] [2f13b191] master: glTF exporter: fix spam debug print
Julien Duroure
noreply at git.blender.org
Tue Dec 3 06:50:47 CET 2019
Commit: 2f13b191ad9fa01915cd62739f99598529a21f0b
Author: Julien Duroure
Date: Tue Dec 3 06:50:20 2019 +0100
Branches: master
https://developer.blender.org/rBA2f13b191ad9fa01915cd62739f99598529a21f0b
glTF exporter: fix spam debug print
===================================================================
M io_scene_gltf2/__init__.py
M io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py
===================================================================
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index e05e588f..45a09fa2 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, 18),
+ "version": (1, 1, 19),
'blender': (2, 81, 6),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
@@ -564,7 +564,7 @@ class GLTF_PT_export_geometry_compression(bpy.types.Panel):
def __init__(self):
from io_scene_gltf2.io.exp import gltf2_io_draco_compression_extension
- self.is_draco_available = gltf2_io_draco_compression_extension.dll_exists()
+ self.is_draco_available = gltf2_io_draco_compression_extension.dll_exists(quiet=True)
@classmethod
def poll(cls, context):
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 fc65edbd..93c326bb 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
@@ -40,14 +40,15 @@ def dll_path() -> Path:
return path if path is not None else ''
-def dll_exists() -> bool:
+def dll_exists(quiet=False) -> bool:
"""
Checks whether the DLL path exists.
:return: True if the DLL exists.
"""
exists = dll_path().exists()
- print("'{}' ".format(dll_path().absolute()) + ("exists, draco mesh compression is available" if exists else
- "does not exist, draco mesh compression not available"))
+ if quiet is False:
+ print("'{}' ".format(dll_path().absolute()) + ("exists, draco mesh compression is available" if exists else
+ "does not exist, draco mesh compression not available"))
return exists
@@ -175,7 +176,7 @@ def __compress_primitive(primitive, dll, export_settings):
enable_normals = 'NORMAL' in attributes
tex_coord_attrs = [attributes[attr] for attr in attributes if attr.startswith('TEXCOORD_')]
- print_console('INFO', ('Draco exporter: Compressing primitive %s normal attribute and with %d ' +
+ print_console('INFO', ('Draco exporter: Compressing primitive %s normal attribute and with %d ' +
'texture coordinate attributes, along with positions.') %
('with' if enable_normals else 'without', len(tex_coord_attrs)))
More information about the Bf-extensions-cvs
mailing list