[Bf-extensions-cvs] [50394a12] master: glTF expoter: Fix T69089 remove hard coded blender & python version

Julien Duroure noreply at git.blender.org
Sat Aug 24 09:18:17 CEST 2019


Commit: 50394a12df3f40c2df0ae1c55e7060e0cb12327f
Author: Julien Duroure
Date:   Sat Aug 24 09:15:07 2019 +0200
Branches: master
https://developer.blender.org/rBA50394a12df3f40c2df0ae1c55e7060e0cb12327f

glTF expoter: Fix T69089 remove hard coded blender & python version

===================================================================

M	io_scene_gltf2/io/exp/gltf2_io_draco_compression_extension.py

===================================================================

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)



More information about the Bf-extensions-cvs mailing list