diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index e05e588f2728f89c05e9b4c3542ff7771aa7f9bd..45a09fa2729c59c1b18e5daf8359238377361366 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 fc65edbd0e343d863d9b900046b1bf3fa857e538..93c326bb1d9c090ccf5e03116a6b5c0d601b9d48 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)))