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:
-rw-r--r--io_mesh_stl/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py
index fdf7a1b4..0a1ca354 100644
--- a/io_mesh_stl/__init__.py
+++ b/io_mesh_stl/__init__.py
@@ -80,7 +80,10 @@ class ImportSTL(bpy.types.Operator, ImportHelper):
directory = StringProperty()
def execute(self, context):
- paths = (os.path.join(self.directory, name.name) for name in self.files)
+ paths = [os.path.join(self.directory, name.name) for name in self.files]
+
+ if not paths:
+ paths.append(self.filepath)
for path in paths:
objName = bpy.path.display_name(path.split("\\")[-1].split("/")[-1])