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:
authorCampbell Barton <ideasman42@gmail.com>2010-07-14 15:59:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-14 15:59:08 +0400
commit475c45e4b1c3052885c222bd42afd4d78343b74a (patch)
treec848b5b644796ccbedd2e06b1b911d3bccac5719 /io_export_directx_x.py
parentd20a38c4069ff1896b20eb3cef83cfab77e862ca (diff)
bugfix [#22843] Cannot export to folder with ".blend" on the end.
Diffstat (limited to 'io_export_directx_x.py')
-rw-r--r--io_export_directx_x.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index 8b41f01c..40c1c931 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -1038,9 +1038,7 @@ class DirectXExporter(bpy.types.Operator):
def menu_func(self, context):
- DefaultPath = bpy.data.filepath
- if DefaultPath.endswith(".blend"):
- DefaultPath = DefaultPath[:-6] + ".x"
+ DefaultPath = os.path.splitext(bpy.data.filepath)[0] + ".x"
self.layout.operator(DirectXExporter.bl_idname, text="DirectX (.x)").filepath = DefaultPath