From 9db5be7533b0d86bf47536a3727cb03ac8b13c82 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Wed, 27 Dec 2017 01:04:05 -0800 Subject: [PATCH] Fix Span/BlendSpan discriminator We're only a BlendSpan if the *first* layer of a material has a blend. Other layers are permitted to have blend modes, because those don't affect the blending of the span itself against other spans. This matches the behaviour of PlasmaMax: https://github.com/H-uru/Plasma/blob/42c4acbc9d2ddf7e0d4486ba3edfdd6c40e2f84b/Sources/Tools/MaxConvert/plMeshConverter.cpp#L1205-L1210 --- korman/exporter/mesh.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index 7161220..718f278 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -70,14 +70,9 @@ class _RenderLevel: class _DrawableCriteria: def __init__(self, bo, hsgmat, pass_index): - for layer in hsgmat.layers: - if layer.object.state.blendFlags & hsGMatState.kBlendMask: - self.blend_span = True - break - else: - self.blend_span = False - + self.blend_span = hsgmat.layers[0].object.state.blendFlags & hsGMatState.kBlendMask self.criteria = 0 + if self.blend_span: for mod in bo.plasma_modifiers.modifiers: if mod.requires_face_sort: