diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-09 00:37:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-09 00:37:38 +0300 |
commit | 9a578cb56610e7f7ec8c9349b77c9cd970b17c8d (patch) | |
tree | fa5c9f4dff6309fe4499da7edc0f0ff8ecd5a38a /io_mesh_uv_layout | |
parent | ae2c9b04e5d68dc6244b06d1e27bf6c3148f5d28 (diff) |
io_mesh_uv_layout: lazy import exporter modules
Minimize time spent loading modules on startup.
Diffstat (limited to 'io_mesh_uv_layout')
-rw-r--r-- | io_mesh_uv_layout/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/io_mesh_uv_layout/__init__.py b/io_mesh_uv_layout/__init__.py index 2c525140..bd2c97bd 100644 --- a/io_mesh_uv_layout/__init__.py +++ b/io_mesh_uv_layout/__init__.py @@ -46,10 +46,6 @@ if "bpy" in locals(): import os import bpy -from . import export_uv_eps -from . import export_uv_png -from . import export_uv_svg - from bpy.props import ( StringProperty, BoolProperty, @@ -221,10 +217,13 @@ class ExportUVLayout(bpy.types.Operator): def get_exporter(self): if self.mode == 'PNG': + from . import export_uv_png return export_uv_png.export elif self.mode == 'EPS': + from . import export_uv_eps return export_uv_eps.export elif self.mode == 'SVG': + from . import export_uv_svg return export_uv_svg.export else: assert False |