Import fixes for exporter
authorMikko Rasa <tdb@tdb.fi>
Sun, 16 Jun 2019 08:48:32 +0000 (11:48 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 16 Jun 2019 08:51:52 +0000 (11:51 +0300)
blender/io_mspgl/export_scene.py
blender/io_mspgl/export_texture.py

index 5ec3803d8bb94859bb1e7a358289242afceadfc7..68b589879c4fdc2722f41157bfe018590d0122f9 100644 (file)
@@ -62,8 +62,8 @@ class SceneExporter:
                scene_res = self.export_scene(context, objs, progress, prototypes=object_prototypes, resources=resources)
                refs = scene_res.collect_references()
 
-               from .datafile import Statement
                if self.resource_collection:
+                       from .datafile import Statement
                        keywords = { ".mat": "material",
                                ".mesh": "mesh",
                                ".object": "object",
index 0a43ce624cfb296348e9a08c2cf4ada186f8068f..c3c58c3b19e9ae3affab9830e95a3eec02b42762 100644 (file)
@@ -23,7 +23,6 @@ class TextureExporter:
                                tex_res.statements.append(Statement("min_filter", Token('NEAREST')))
 
                if not self.inline_data and texture.image.filepath:
-                       from .util import image_name
                        tex_res.statements.append(Statement("external_image", os.path.basename(texture.image.filepath)))
                else:
                        texdata = ""