[Bf-extensions-cvs] [a7a62528] master: io_scene_gltf2: lazy import gltf2_io_draco_compression_extension

Campbell Barton noreply at git.blender.org
Thu Oct 10 01:41:46 CEST 2019


Commit: a7a6252882c501ef5dd41e75bbcdbc8d030917a0
Author: Campbell Barton
Date:   Thu Oct 10 10:38:06 2019 +1100
Branches: master
https://developer.blender.org/rBAa7a6252882c501ef5dd41e75bbcdbc8d030917a0

io_scene_gltf2: lazy import gltf2_io_draco_compression_extension

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

M	io_scene_gltf2/__init__.py

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 935f84ad..0548f2ec 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -60,7 +60,6 @@ from bpy.props import (StringProperty,
                        IntProperty)
 from bpy.types import Operator
 from bpy_extras.io_utils import ImportHelper, ExportHelper
-from io_scene_gltf2.io.exp import gltf2_io_draco_compression_extension
 
 
 #
@@ -72,6 +71,7 @@ class ExportGLTF2_Base:
     # TODO: refactor to avoid boilerplate
 
     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()
 
     bl_options = {'UNDO', 'PRESET'}
@@ -551,6 +551,7 @@ class GLTF_PT_export_geometry_compression(bpy.types.Panel):
     bl_options = {'DEFAULT_CLOSED'}
 
     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()
 
     @classmethod
@@ -833,4 +834,3 @@ def unregister():
     # remove from the export / import menu
     bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
     bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
-



More information about the Bf-extensions-cvs mailing list