From 95879a68737417f67b01f123b8ffdff031806008 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 5 Feb 2022 17:10:44 -0500 Subject: [PATCH] Fix #292. --- korman/exporter/mesh.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index 2f607a6..a840625 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -410,9 +410,11 @@ class MeshConverter(_MeshManager): tessface_alphas = (1.0, 1.0, 1.0, 1.0) else: src = alpha[i] - # average color becomes the alpha value - tessface_alphas = ((sum(src.color1) / 3), (sum(src.color2) / 3), - (sum(src.color3) / 3), (sum(src.color4) / 3)) + # Some time between 2.79b and 2.80, vertex alpha colors appeared in Blender. However, + # there is no way to actually visually edit them. That means that we need to keep that + # fact in mind because we're just averaging the color to make alpha. + tessface_alphas = ((sum(src.color1[:3]) / 3), (sum(src.color2[:3]) / 3), + (sum(src.color3[:3]) / 3), (sum(src.color4[:3]) / 3)) if bumpmap is not None: gradPass = []