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:
Diffstat (limited to 'release/scripts/io/export_3ds.py')
-rw-r--r--release/scripts/io/export_3ds.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/release/scripts/io/export_3ds.py b/release/scripts/io/export_3ds.py
index 5833dd01f3c..9cb5f3a077b 100644
--- a/release/scripts/io/export_3ds.py
+++ b/release/scripts/io/export_3ds.py
@@ -494,8 +494,7 @@ def make_material_texture_chunk(id, images):
mat_sub = _3ds_chunk(id)
def add_image(img):
- filename = os.path.basename(image.filename)
-# filename = image.filename.split('\\')[-1].split('/')[-1]
+ filename = os.path.basename(image.filepath)
mat_sub_file = _3ds_chunk(MATMAPFILE)
mat_sub_file.add_variable("mapfile", _3ds_string(sane_name(filename)))
mat_sub.add_subchunk(mat_sub_file)
@@ -1142,7 +1141,7 @@ class Export3DS(bpy.types.Operator):
# Add to a menu
def menu_func(self, context):
- default_path = bpy.data.filename.replace(".blend", ".3ds")
+ default_path = bpy.data.filepath.replace(".blend", ".3ds")
self.layout.operator(Export3DS.bl_idname, text="3D Studio (.3ds)").path = default_path