Skip to content
Snippets Groups Projects
Commit 11bc851e authored by Julien Duroure's avatar Julien Duroure
Browse files

glTF: Draco: Directly look at path specified by environment variable

parent 0e480c8f
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
bl_info = { bl_info = {
'name': 'glTF 2.0 format', 'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (3, 3, 9), "version": (3, 3, 10),
'blender': (3, 3, 0), 'blender': (3, 3, 0),
'location': 'File > Import-Export', 'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0', 'description': 'Import-Export as glTF 2.0',
......
...@@ -27,7 +27,7 @@ def dll_path() -> Path: ...@@ -27,7 +27,7 @@ def dll_path() -> Path:
'darwin': blender_root.parent / 'Resources' / python_lib / python_version / 'site-packages' 'darwin': blender_root.parent / 'Resources' / python_lib / python_version / 'site-packages'
}.get(sys.platform) }.get(sys.platform)
else: else:
path = Path(path) return Path(path)
library_name = { library_name = {
'win32': '{}.dll'.format(lib_name), 'win32': '{}.dll'.format(lib_name),
...@@ -46,12 +46,11 @@ def dll_exists(quiet=False) -> bool: ...@@ -46,12 +46,11 @@ def dll_exists(quiet=False) -> bool:
Checks whether the DLL path exists. Checks whether the DLL path exists.
:return: True if the DLL exists. :return: True if the DLL exists.
""" """
exists = dll_path().exists() path = dll_path()
exists = path.exists() and path.is_file()
if quiet is False: if quiet is False:
print("'{}' ".format(dll_path().absolute()) + ("exists, draco mesh compression is available" if exists else if exists:
"{} {} {}".format( print_console('INFO', 'Draco mesh compression is available, use library at %s' % dll_path().absolute())
"does not exist, draco mesh compression not available,", else:
"please add it or create environment variable BLENDER_EXTERN_DRACO_LIBRARY_PATH", print_console('ERROR', 'Draco mesh compression is not available because library could not be found at %s' % dll_path().absolute())
"pointing to the folder"
)))
return exists return exists
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment