From aaf05a1d20dd991077d59645e963c5cbcbecd6dc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 2 Jul 2006 23:09:37 +0000 Subject: Made geometrys polyfill work with all iterators (not just lists) and updated bpymeshes ngon to ignore polylines with <3 verts. --- release/scripts/bpymodules/BPyMesh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/bpymodules/BPyMesh.py b/release/scripts/bpymodules/BPyMesh.py index 780bc7ba2f4..5e111340217 100644 --- a/release/scripts/bpymodules/BPyMesh.py +++ b/release/scripts/bpymodules/BPyMesh.py @@ -755,6 +755,8 @@ def ngon(from_data, indices, PREF_FIX_LOOPS= True): for verts in loop_list: while verts and verts[0][1]==verts[-1][1]: verts.pop() + + loop_list= [verts for verts in loop_list if len(verts)>2] # DONE DEALING WITH LOOP FIXING @@ -767,7 +769,7 @@ def ngon(from_data, indices, PREF_FIX_LOOPS= True): vert_map[i+ii]= vert[2] ii+=len(verts) - fill= Blender.Geometry.PolyFill([ [v[0] for v in loop] for loop in loop_list if len(loop) > 2 ]) + fill= Blender.Geometry.PolyFill([ [v[0] for v in loop] for loop in loop_list ]) #draw_loops(loop_list) #raise 'done loop' # map to original indicies -- cgit v1.2.3