Browse Source

Fix duplicate DSpan exports

Arbitrary data from a material's layer flags were able to creep into a
DSpan's criteria, causing geometry that should go into the same span to
spawn a new DSpan with an identical name. Only one of the DSpan objects
would be exported, and Uru would either show crazy stuff or crash as a
result.
pull/109/head
Adam Johnson 6 years ago
parent
commit
1200979322
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 2
      korman/exporter/mesh.py

2
korman/exporter/mesh.py

@ -70,7 +70,7 @@ class _RenderLevel:
class _DrawableCriteria: class _DrawableCriteria:
def __init__(self, bo, hsgmat, pass_index): def __init__(self, bo, hsgmat, pass_index):
self.blend_span = hsgmat.layers[0].object.state.blendFlags & hsGMatState.kBlendMask self.blend_span = bool(hsgmat.layers[0].object.state.blendFlags & hsGMatState.kBlendMask)
self.criteria = 0 self.criteria = 0
if self.blend_span: if self.blend_span:

Loading…
Cancel
Save