diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-20 23:45:05 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-04-20 23:45:05 +0400 |
commit | 600104361be44393d36dadd3040a5326303e0ff1 (patch) | |
tree | 6ec5bcb4a67e474284d7c434e0228b08002fc005 /io_scene_obj/export_obj.py | |
parent | 911691d6e8b208e2a4a2d016cf21e07ea1396887 (diff) |
Fix [#31039] Obj export adds blendfile name to the texture names (and [31040] too).
bpy_extras.io_utils.path_reference() expects a real dir as base_src, not the blend file name!
Diffstat (limited to 'io_scene_obj/export_obj.py')
-rw-r--r-- | io_scene_obj/export_obj.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index f7e8f59b..99bd2f5d 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -42,13 +42,13 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict): else: world_amb = Color((0.0, 0.0, 0.0)) - source_dir = bpy.data.filepath + source_dir = os.path.dirname(bpy.data.filepath) dest_dir = os.path.dirname(filepath) file = open(filepath, "w", encoding="utf8", newline="\n") fw = file.write - fw('# Blender MTL File: %r\n' % os.path.basename(bpy.data.filepath)) + fw('# Blender MTL File: %r\n' % (os.path.basename(bpy.data.filepath) or "None")) fw('# Material Count: %i\n' % len(mtl_dict)) mtl_dict_values = list(mtl_dict.values()) |