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. 4
      korman/exporter/convert.py
  2. 3
      korman/properties/modifiers/base.py

4
korman/exporter/convert.py

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

3
korman/properties/modifiers/base.py

@ -80,6 +80,8 @@ class PlasmaModifierProperties(bpy.types.PropertyGroup):
Drawables that will render in the same pass""" Drawables that will render in the same pass"""
return False 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: def pre_export(self, exporter, bo: bpy.types.Object) -> Generator:
"""This is the first phase of the modifier export; allowing modifiers to create additonal """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 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. when the export completes. PRP objects should generally not be exported in this phase.
""" """
yield yield
'''
@property @property
def requires_actor(self): def requires_actor(self):

Loading…
Cancel
Save