From 120097932225854c4d61dc3cd57636e9d7fd6898 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 15 Aug 2018 21:49:03 -0400 Subject: [PATCH] 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. --- korman/exporter/mesh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index cbf1b95..c107ac9 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -70,7 +70,7 @@ class _RenderLevel: class _DrawableCriteria: 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 if self.blend_span: