diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-08-24 10:15:07 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-08-24 10:15:07 +0300 |
commit | 50394a12df3f40c2df0ae1c55e7060e0cb12327f (patch) | |
tree | 03808caea0e2a94ed2cced1438ae16bf5bdc20d0 | |
parent | 4e7b694ee44060373ae20dd2e71644a1230dd569 (diff) |
glTF expoter: Fix T69089 remove hard coded blender & python version
-rw-r--r-- | io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py | 7 |
1 files changed, 4 insertions, 3 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 222aab3a..1db5ca91 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 @@ -28,11 +28,12 @@ def dll_path() -> Path: """ lib_name = 'extern_draco' blender_root = Path(bpy.app.binary_path).parent - python_lib = Path('2.80/python/lib') + python_lib = "{v[0]}.{v[1]}/python/lib".format(v=bpy.app.version) + python_version = "python{v[0]}.{v[1]}".format(v=sys.version_info) paths = { 'win32': blender_root/python_lib/'site-packages'/'{}.dll'.format(lib_name), - 'linux': blender_root/python_lib/'python3.7'/'site-packages'/'lib{}.so'.format(lib_name), - 'darwin': blender_root.parent/'Resources'/python_lib/'python3.7'/'site-packages'/'lib{}.dylib'.format(lib_name) + 'linux': blender_root/python_lib/python_version/'site-packages'/'lib{}.so'.format(lib_name), + 'darwin': blender_root.parent/'Resources'/python_lib/python_version/'site-packages'/'lib{}.dylib'.format(lib_name) } path = paths.get(sys.platform) |