Browse Source

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:
42c4acbc9d/Sources/Tools/MaxConvert/plMeshConverter.cpp (L1205-L1210)
pull/88/head
Darryl Pogue 7 years ago
parent
commit
9db5be7533
No known key found for this signature in database
GPG Key ID: CB824715C3E6FD41
  1. 9
      korman/exporter/mesh.py

9
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:

Loading…
Cancel
Save