X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fexport_mesh.py;h=3873bf329e627f2d108085b73cc0ca76b1c2b8af;hb=9d8e4aa5a9573b34fe06455af249c762433d47c0;hp=140d745e071b77a885ca64c5f8b983d81ee017ad;hpb=1a561b4e8d77fd14711b2304152e0b2408a49fdf;p=libs%2Fgl.git diff --git a/blender/io_mspgl/export_mesh.py b/blender/io_mspgl/export_mesh.py index 140d745e..3873bf32 100644 --- a/blender/io_mspgl/export_mesh.py +++ b/blender/io_mspgl/export_mesh.py @@ -41,15 +41,8 @@ class MeshExporter: self.max_strip_len = 1024 self.optimize_cache = True self.cache_size = 64 - self.export_lines = False - self.export_uv = "UNIT0" - self.tbn_vecs = False - self.tbn_uvtex = "" self.compound = False self.material_tex = False - self.smoothing = "MSPGL" - self.export_groups = False - self.max_groups = 2 def stripify(self, mesh, progress=None): for f in mesh.faces: @@ -64,6 +57,7 @@ class MeshExporter: cache = VertexCache(self.cache_size) island = [] + face_neighbors = [] island_strips = [] while 1: if not island: @@ -83,11 +77,13 @@ class MeshExporter: face = queue.pop(0) island.append(face) - for n in f.get_neighbors(): + for n in face.get_neighbors(): if not n.flag: n.flag = True queue.append(n) + face_neighbors = [f.get_neighbors() for f in island] + # Unflag the island for the next phase for f in island: f.flag = False @@ -97,11 +93,11 @@ class MeshExporter: # or along borders of a non-closed island. best = 5 face = None - for f in island: + for i, f in enumerate(island): if f.flag: continue - score = sum(not n.flag for n in f.get_neighbors()) + score = sum(not n.flag for n in face_neighbors[i]) if score>0 and score