From 3cb1d43e96da956e3438b6138ed57f856b85b695 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 14 Aug 2021 00:27:01 -0400 Subject: [PATCH] Bonus: Minor performance improvement. --- korman/exporter/mesh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index 0600bda..6412d22 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -505,9 +505,10 @@ class MeshConverter(_MeshManager): face_verts.append(data.blender2gs[vertex][coluv]) # Convert to triangles, if need be... - if len(face_verts) == 3: + num_faces = len(face_verts) + if num_faces == 3: 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[2], face_verts[3])