diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-12-30 12:40:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-12-30 12:40:05 +0300 |
commit | 98f607e1278bf0360d9b0034602276ac9d1c54e7 (patch) | |
tree | d4fd749f89b91b012ace5304ad4f46ff247ab935 /release/scripts/mesh_edges2curves.py | |
parent | 5af67129f8d3c2245772a55e5fa5ea4cd0653477 (diff) |
use new edge/face keys ittributes
Diffstat (limited to 'release/scripts/mesh_edges2curves.py')
-rw-r--r-- | release/scripts/mesh_edges2curves.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/release/scripts/mesh_edges2curves.py b/release/scripts/mesh_edges2curves.py index 70be7524b5c..fdf61298ebc 100644 --- a/release/scripts/mesh_edges2curves.py +++ b/release/scripts/mesh_edges2curves.py @@ -56,21 +56,14 @@ def polysFromMesh(me): polyLines = [] # Get edges not used by a face - edgeDict= dict([ edkey(ed) for ed in me.edges ]) + edgeDict= dict([ (ed.key, ed) for ed in me.edges ]) for f in me.faces: - fvi = [v.index for v in f] - for i in xrange(len(fvi)): - i1 = fvi[i] - i2 = fvi[i-1] - if i1>i2: - key = i2,i1 - else: - key = i1,i2 - + for key in f.edge_keys: try: del edgeDict[key] except: pass + edges= edgeDict.values() @@ -112,7 +105,7 @@ def polysFromMesh(me): del edges[i] #break polyLines.append((polyLine, polyLine[0]==polyLine[-1])) - print len(edges), len(polyLines) + # print len(edges), len(polyLines) return polyLines @@ -133,7 +126,7 @@ def mesh2polys(): cu.name = me.name cu.setFlag(1) - ob = scn.objects.new(cu) + ob = scn.objects.active = scn.objects.new(cu) ob.setMatrix(meshOb.matrixWorld) i=0 |