diff options
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/__init__.py | 5 |
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]) |