Skip to content
Snippets Groups Projects
Commit 31bccec0 authored by Campbell Barton's avatar Campbell Barton
Browse files

Fix T39629: Teapot creates corrupt mesh

more of a workaround, at least stops crash.
parent 95a9c96d
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,22 @@ if __name__ == "__main__":
register()
def create_mesh_face_hack(faces):
# FIXME, faces with duplicate vertices shouldn't be created in the first place.
faces_copy = []
for f in faces:
f_copy = []
for i in f:
if i not in f_copy:
f_copy.append(i)
faces_copy.append(f_copy)
faces[:] = faces_copy
def create_mesh_object(context, verts, edges, faces, name):
create_mesh_face_hack(faces)
# Create new mesh
mesh = bpy.data.meshes.new(name)
# Make a mesh from a list of verts/edges/faces.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment