diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-22 13:03:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-22 13:03:37 +0300 |
commit | 0a2db9698257b70d8eff69051b5b1b577dde73a5 (patch) | |
tree | dca5bf42ad71fdf91f006f9faa1a64285c30f1d1 /io_scene_obj | |
parent | 5b308e020969a14359f662cb8d69d144288c53a6 (diff) |
write \n even on windows so files can be compared between windows and linux (for testing).
most editors (besides notepad) will open these files without trouble.
Diffstat (limited to 'io_scene_obj')
-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 4d709d0e..2fe4a804 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -59,7 +59,7 @@ def write_mtl(scene, filepath, copy_images, mtl_dict): rel = fn return rel - file = open(filepath, "w", encoding='utf8') + file = open(filepath, "w", encoding="utf8", newline="\n") file.write('# Blender MTL File: %r\n' % os.path.basename(bpy.data.filepath)) file.write('# Material Count: %i\n' % len(mtl_dict)) # Write material/image combinations we have used. @@ -315,7 +315,7 @@ def write_file(filepath, objects, scene, # time1 = sys.time() # scn = Scene.GetCurrent() - file = open(filepath, "w") + file = open(filepath, "w", encoding="utf8", newline="\n") # Write Header file.write('# Blender v%s OBJ File: %r\n' % (bpy.app.version_string, os.path.basename(bpy.data.filepath))) |