Browse Source

Fix #281.

The default definition of `pre_export()` (for documentation purposes)
was hiding the real default implementation of `pre_export()`, causing
any modifiers relying on said default implementation to export nothing.
pull/282/head
Adam Johnson 3 years ago
parent
commit
d7372acebd
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 6
      korman/exporter/convert.py
  2. 3
      korman/properties/modifiers/base.py

6
korman/exporter/convert.py

@ -431,8 +431,10 @@ class Exporter:
def do_pre_export(bo):
for mod in bo.plasma_modifiers.modifiers:
for i in filter(None, mod.pre_export(self, bo)):
handle_temporary(i, bo)
proc = getattr(mod, "pre_export", None)
if proc is not None:
for i in filter(None, proc(self, bo)):
handle_temporary(i, bo)
for bl_obj in self._objects:
do_pre_export(bl_obj)

3
korman/properties/modifiers/base.py

@ -80,6 +80,8 @@ class PlasmaModifierProperties(bpy.types.PropertyGroup):
Drawables that will render in the same pass"""
return False
# This is temporarily commented out to prevent MRO failure. Revisit in Python 3.7
'''
def pre_export(self, exporter, bo: bpy.types.Object) -> Generator:
"""This is the first phase of the modifier export; allowing modifiers to create additonal
objects or logic nodes to be used by the exporter. To do so, overload this method
@ -87,6 +89,7 @@ class PlasmaModifierProperties(bpy.types.PropertyGroup):
when the export completes. PRP objects should generally not be exported in this phase.
"""
yield
'''
@property
def requires_actor(self):

Loading…
Cancel
Save