]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix line exporting
authorMikko Rasa <tdb@tdb.fi>
Sat, 16 Aug 2014 22:45:54 +0000 (01:45 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 16 Aug 2014 22:45:54 +0000 (01:45 +0300)
blender/io_mspgl/export_mesh.py
blender/io_mspgl/mesh.py

index f429ff3199b290d9b2a23e969e3ac3497435d2e5..7ce501bced05bb122eccf2ff518b57e791b334a2 100644 (file)
@@ -365,7 +365,7 @@ class MeshExporter:
                        out_file.end()
 
                if self.export_lines and mesh.lines:
                        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()
                        for l in mesh.lines:
                                out_file.write("indices", l.vertices[0].index, l.vertices[1].index)
                        out_file.end()
index 88758730881d0c734373ae081b50ea48b60cf760..3a7400b7e6c2f296c2a582d42af19847bdaca143 100644 (file)
@@ -162,6 +162,8 @@ class Mesh:
                                f.edges.append(e)
 
                self.lines = [Line(e) for e in self.edges.values() if not e.faces]
                                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)
 
                if self.use_auto_smooth:
                        smooth_limit = math.cos(self.auto_smooth_angle)