From 1ee4c5be514ac6c8ed43acbb651d5c7375a6e1fe Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Tue, 26 Dec 2017 22:37:09 -0800 Subject: [PATCH] Sort spans for opacity modifiers --- korman/exporter/mesh.py | 2 +- korman/properties/modifiers/render.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index 7161220..787c3da 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -83,7 +83,7 @@ class _DrawableCriteria: if mod.requires_face_sort: self.criteria |= plDrawable.kCritSortFaces if mod.requires_span_sort: - self.sort_spans |= plDrawable.kCritSortSpans + self.criteria |= plDrawable.kCritSortSpans self.render_level = _RenderLevel(bo, hsgmat, pass_index, self.blend_span) def __eq__(self, other): diff --git a/korman/properties/modifiers/render.py b/korman/properties/modifiers/render.py index cf9247f..76ef246 100644 --- a/korman/properties/modifiers/render.py +++ b/korman/properties/modifiers/render.py @@ -81,6 +81,10 @@ class PlasmaFadeMod(PlasmaModifierProperties): mod.farOpaq = self.far_opaq mod.farTrans = self.far_trans + @property + def requires_span_sort(self): + return True + class PlasmaFollowMod(idprops.IDPropObjectMixin, PlasmaModifierProperties): pl_id = "followmod"