Browse Source

Bonus: Minor performance improvement.

pull/274/head
Adam Johnson 3 years ago
parent
commit
3cb1d43e96
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 5
      korman/exporter/mesh.py

5
korman/exporter/mesh.py

@ -505,9 +505,10 @@ class MeshConverter(_MeshManager):
face_verts.append(data.blender2gs[vertex][coluv]) face_verts.append(data.blender2gs[vertex][coluv])
# Convert to triangles, if need be... # Convert to triangles, if need be...
if len(face_verts) == 3: num_faces = len(face_verts)
if num_faces == 3:
data.triangles += face_verts data.triangles += face_verts
elif len(face_verts) == 4: elif num_faces == 4:
data.triangles += (face_verts[0], face_verts[1], face_verts[2]) data.triangles += (face_verts[0], face_verts[1], face_verts[2])
data.triangles += (face_verts[0], face_verts[2], face_verts[3]) data.triangles += (face_verts[0], face_verts[2], face_verts[3])

Loading…
Cancel
Save