diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-12-03 08:50:20 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-12-03 08:50:20 +0300 |
commit | 2f13b191ad9fa01915cd62739f99598529a21f0b (patch) | |
tree | af019ca1af3780438f806b079e69cafcb52e902d /io_scene_gltf2 | |
parent | 3314a85d0aa2fa115332ae8676b1a56725718d8f (diff) |
glTF exporter: fix spam debug print
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-x | io_scene_gltf2/__init__.py | 4 | ||||
-rw-r--r-- | io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py | 9 |
2 files changed, 7 insertions, 6 deletions
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))) |