diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-18 07:42:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-18 07:42:53 +0400 |
commit | 5027ccba53daff62acb356afc55fa8f1f7718ab0 (patch) | |
tree | 09b01c6e71c82431293ce8e81970018614bbed23 /io_mesh_stl | |
parent | d08ba14bd217376d868d44ab281c789ae92aece5 (diff) |
updates for changes in blenders api
Diffstat (limited to 'io_mesh_stl')
-rw-r--r-- | io_mesh_stl/blender_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py index 4bf9e8fc..5b3bdd77 100644 --- a/io_mesh_stl/blender_utils.py +++ b/io_mesh_stl/blender_utils.py @@ -40,11 +40,11 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True): From a list of faces, return the face triangulated if needed. ''' for face in mesh.faces: - if triangulate and len(face.verts) == 4: - yield face.verts[:3] - yield face.verts[2:] + [face.verts[0]] + if triangulate and len(face.vertices) == 4: + yield face.vertices[:3] + yield face.vertices[2:] + [face.vertices[0]] else: - yield list(face.verts) + yield list(face.vertices) - return ([tuple(ob.matrix_world * mesh.verts[index].co) + return ([tuple(ob.matrix_world * mesh.vertices[index].co) for index in indexes] for indexes in iter_face_index()) |