Skip to content
Snippets Groups Projects
Commit b3c8b727 authored by Campbell Barton's avatar Campbell Barton
Browse files

support for calling the operator with only filepath set.

parent d746994e
No related branches found
No related tags found
No related merge requests found
......@@ -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])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment