Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-08-24 10:15:07 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-08-24 10:15:07 +0300
commit50394a12df3f40c2df0ae1c55e7060e0cb12327f (patch)
tree03808caea0e2a94ed2cced1438ae16bf5bdc20d0
parent4e7b694ee44060373ae20dd2e71644a1230dd569 (diff)
glTF expoter: Fix T69089 remove hard coded blender & python version
-rw-r--r--io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py7
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)