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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-09-13 13:26:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-09-14 11:22:01 +0300
commitf50a11ff30e785bf4dcf7746d23b507e4314bbd3 (patch)
tree06a0a73e746d626128a51a6e6279ec99b61a6eb7
parent369e7413402091a1e22c05b743454a0a72351ec6 (diff)
Fix T49338: Export to OBJ add extra space to the texture file name on MTL file
-rw-r--r--io_scene_obj/export_obj.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index 9418cc67..3933abfa 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -188,7 +188,10 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict):
options.append('-o %.6f %.6f %.6f' % mtex.offset[:])
if mtex.scale != Vector((1.0, 1.0, 1.0)):
options.append('-s %.6f %.6f %.6f' % mtex.scale[:])
- fw('%s %s %s\n' % (key, " ".join(options), repr(filepath)[1:-1]))
+ if options:
+ fw('%s %s %s\n' % (key, " ".join(options), repr(filepath)[1:-1]))
+ else:
+ fw('%s %s\n' % (key, repr(filepath)[1:-1]))
def test_nurbs_compat(ob):