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>2016-02-02 14:01:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-02 14:01:03 +0300
commit4355471ae8b18d60f7d5072d7015b69e2be4dbe4 (patch)
treee7ce1aa9a43851d00e6c147f6cd971130440f702
parent9fe70215a0a9ec58e338571c029a80a44b075d73 (diff)
Fix T47299: Error writing MTL options
-rw-r--r--io_scene_obj/export_obj.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index fbbc1e9c..26ca8a04 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -180,15 +180,15 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict):
for key, (mtex, image) in sorted(image_map.items()):
filepath = bpy_extras.io_utils.path_reference(image.filepath, source_dir, dest_dir,
path_mode, "", copy_set, image.library)
- options = [""]
+ options = []
if key == "map_Bump":
if mtex.normal_factor != 1.0:
- options += ['-bm', mtex.normal_factor]
+ options.append('-bm %.6f' % mtex.normal_factor)
if mtex.offset != Vector((0.0, 0.0, 0.0)):
- options += ['-o', mtex.offset.x, mtex.offset.y, mtex.offset.z]
+ options.append('-o %.6f %.6f %.6f' % mtex.offset[:])
if mtex.scale != Vector((1.0, 1.0, 1.0)):
- options += ['-s', mtex.scale.x, mtex.scale.y, mtex.scale.z]
- fw('%s%s %s\n' % (key, " ".join(options), repr(filepath)[1:-1]))
+ options.append('-s %.6f %.6f %.6f' % mtex.scale[:])
+ fw('%s %s %s\n' % (key, " ".join(options), repr(filepath)[1:-1]))
def test_nurbs_compat(ob):