Skip to content
This repository has been archived by the owner on Jan 22, 2023. It is now read-only.

Commit

Permalink
fix corner case where all verts are on one plane
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrmaxmeier committed Jun 18, 2016
1 parent 5408161 commit 4139374
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/blender/bob_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ def save(operator, context, filepath, triangulate, check_existing):
mesh = obj.to_mesh(scene, True, 'PREVIEW')
mesh.transform(global_matrix * obj.matrix_world) # inverse transformation

with to_bmesh(mesh) as bm:
triangulate = triangulate or any([len(face.verts) != 3 for face in bm.faces])
if triangulate or any([len(face.vertices) != 3 for face in mesh.tessfaces]):
print("triangulating...")
with to_bmesh(mesh, save=True) as bm:
Expand Down

0 comments on commit 4139374

Please sign in to comment.