From 95cc5788bd736be92b3810d3fea398fadc8865b1 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 12 Aug 2012 18:53:52 +0300 Subject: [PATCH] Fix bugs that crept in with refactoring Also add an additional safeguard against an infinite loop --- blender/io_mesh_mspgl/export_mspgl.py | 9 ++++++--- blender/io_mesh_mspgl/mesh.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/blender/io_mesh_mspgl/export_mspgl.py b/blender/io_mesh_mspgl/export_mspgl.py index c776c54f..c0fd96e9 100644 --- a/blender/io_mesh_mspgl/export_mspgl.py +++ b/blender/io_mesh_mspgl/export_mspgl.py @@ -111,8 +111,9 @@ class Exporter: island.append(face) for n in f.get_neighbors(): - n.flag = True - queue.append(n) + if not n.flag: + n.flag = True + queue.append(n) # Unflag the island for the next phase for f in island: @@ -127,7 +128,7 @@ class Exporter: if f.flag: continue - score = sum(n.flag for n in f.get_neighbors()) + score = sum(not n.flag for n in f.get_neighbors()) if score>0 and score