Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 4457ecb43e6..0e9b6c136e9 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -79,20 +79,23 @@ class ExportHelper:
return {'RUNNING_MODAL'}
def check(self, context):
+ import os
change_ext = False
change_axis = _check_axis_conversion(self)
check_extension = self.check_extension
if check_extension is not None:
- filepath = bpy.path.ensure_ext(self.filepath,
- self.filename_ext
- if check_extension
- else "")
-
- if filepath != self.filepath:
- self.filepath = filepath
- change_ext = True
+ filepath = self.filepath
+ if os.path.basename(filepath):
+ filepath = bpy.path.ensure_ext(filepath,
+ self.filename_ext
+ if check_extension
+ else "")
+
+ if filepath != self.filepath:
+ self.filepath = filepath
+ change_ext = True
return (change_ext or change_axis)