From 0a2db9698257b70d8eff69051b5b1b577dde73a5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 22 Jan 2011 10:03:37 +0000 Subject: 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. --- io_scene_x3d/export_x3d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'io_scene_x3d') diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py index b81e8cf9..4157878d 100644 --- a/io_scene_x3d/export_x3d.py +++ b/io_scene_x3d/export_x3d.py @@ -84,7 +84,7 @@ class x3d_class: self.filepath = filepath[:-1] # remove trailing z if self.file is None: - self.file = open(self.filepath, "w", encoding='utf8') + self.file = open(self.filepath, "w", encoding="utf8", newline="\n") self.bNav = 0 self.nodeID = 0 @@ -357,7 +357,7 @@ class x3d_class: mesh_faces = mesh.faces[:] mesh_faces_materials = [f.material_index for f in mesh_faces] - + if is_uv and True in mesh_materials_use_face_texture: mesh_faces_image = [(fuv.image if (mesh_materials_use_face_texture[mesh_faces_materials[i]] and fuv.use_image) else mesh_material_images[mesh_faces_materials[i]]) for i, fuv in enumerate(mesh.uv_textures.active.data)] mesh_faces_image_unique = set(mesh_faces_image) -- cgit v1.2.3