diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index a840625..9e28fff 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -94,6 +94,8 @@ class _RenderLevel: return self._calc_level(self.MAJOR_FRAMEBUF) elif mods.test_property("draw_opaque"): return self._calc_level(self.MAJOR_OPAQUE) + elif mods.test_property("draw_late"): + return self._calc_level(self.MAJOR_LATE) elif mods.test_property("draw_no_defer"): blend_span = False diff --git a/korman/properties/modifiers/render.py b/korman/properties/modifiers/render.py index fc28455..98f5331 100644 --- a/korman/properties/modifiers/render.py +++ b/korman/properties/modifiers/render.py @@ -49,7 +49,8 @@ class PlasmaBlendMod(PlasmaModifierProperties): items=[("AUTO", "(Auto)", "Let Korman decide when to render this object."), ("OPAQUE", "Before Avatar", "Prefer for the object to draw before the avatar."), ("FRAMEBUF", "Frame Buffer", "Prefer for the object to draw after the avatar but before other blended objects."), - ("BLEND", "Blended", "Prefer for the object to draw after most other geometry in the blended pass.")], + ("BLEND", "Blended", "Prefer for the object to draw after most other geometry in the blended pass."), + ("LATE", "Late", "Prefer for the object to draw late in the blended pass.")], options=set()) sort_faces = EnumProperty(name="Sort Faces", description="", @@ -73,6 +74,10 @@ class PlasmaBlendMod(PlasmaModifierProperties): def draw_framebuf(self): return self.render_level == "FRAMEBUF" + @property + def draw_late(self): + return self.render_level == "LATE" + @property def draw_no_defer(self): return self.render_level != "BLEND"