diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-14 15:59:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-14 15:59:08 +0400 |
commit | 475c45e4b1c3052885c222bd42afd4d78343b74a (patch) | |
tree | c848b5b644796ccbedd2e06b1b911d3bccac5719 /io_mesh_stl | |
parent | d20a38c4069ff1896b20eb3cef83cfab77e862ca (diff) |
bugfix [#22843] Cannot export to folder with ".blend" on the end.
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py index b671dd9e..1858c17b 100644 --- a/io_mesh_stl/__init__.py +++ b/io_mesh_stl/__init__.py @@ -128,7 +128,8 @@ def menu_import(self, context): def menu_export(self, context): - default_path = bpy.data.filepath.replace(".blend", ".stl") + import os + default_path = os.path.splitext(bpy.data.filepath)[0] + ".stl" self.layout.operator(StlExporter.bl_idname, text="Stl (.stl)").filepath = default_path |