From b1d046591c11ffa596ff3368400df354b145b339 Mon Sep 17 00:00:00 2001 From: Jrius <2261279+Jrius@users.noreply.github.com> Date: Sun, 12 Jan 2025 12:32:29 +0100 Subject: [PATCH] Normals: performance improvement Co-authored-by: Adam Johnson --- korman/exporter/mesh.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index bc3c8f6..9812352 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -398,7 +398,7 @@ class MeshConverter(_MeshManager): dPosDv = hsVector3(0.0, 0.0, 0.0) # Unpack normals - tessface_normals = [tuple(n) for n in tessface.split_normals] + tessface_normals = tessface.split_normals # Unpack the UV coordinates from each UV Texture layer # NOTE: Blender has no third (W) coordinate @@ -448,7 +448,7 @@ class MeshConverter(_MeshManager): # Convert to per-material indices for j, vertex in enumerate(tessface.vertices): - vertex_normal = tessface_normals[j] + vertex_normal = tuple(tessface_normals[j]) uvws = tuple([tuple(uvw[j]) for uvw in tessface_uvws]) # Calculate vertex colors.