From 5aee3912dd2818a282e41aa5eb65c77666aa53bc Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 17 Aug 2014 01:45:54 +0300 Subject: [PATCH] Fix line exporting --- blender/io_mspgl/export_mesh.py | 2 +- blender/io_mspgl/mesh.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/blender/io_mspgl/export_mesh.py b/blender/io_mspgl/export_mesh.py index f429ff31..7ce501bc 100644 --- a/blender/io_mspgl/export_mesh.py +++ b/blender/io_mspgl/export_mesh.py @@ -365,7 +365,7 @@ class MeshExporter: out_file.end() if self.export_lines and mesh.lines: - out_file.write("batch", "LINES") + out_file.begin("batch", "LINES") for l in mesh.lines: out_file.write("indices", l.vertices[0].index, l.vertices[1].index) out_file.end() diff --git a/blender/io_mspgl/mesh.py b/blender/io_mspgl/mesh.py index 88758730..3a7400b7 100644 --- a/blender/io_mspgl/mesh.py +++ b/blender/io_mspgl/mesh.py @@ -162,6 +162,8 @@ class Mesh: f.edges.append(e) self.lines = [Line(e) for e in self.edges.values() if not e.faces] + for l in self.lines: + l.vertices = [self.vertices[i] for i in l.vertices] if self.use_auto_smooth: smooth_limit = math.cos(self.auto_smooth_angle) -- 2.45.2