diff --git a/korman/exporter/convert.py b/korman/exporter/convert.py index 100dcb6..a1d15e7 100644 --- a/korman/exporter/convert.py +++ b/korman/exporter/convert.py @@ -60,6 +60,7 @@ class Exporter: # Step 0.8: Init the progress mgr self.mesh.add_progress_presteps(self.report) self.report.progress_add_step("Collecting Objects") + self.report.progress_add_step("Verify Competence") self.report.progress_add_step("Harvesting Actors") if self._op.lighting_method != "skip": etlight.LightBaker.add_progress_steps(self.report) @@ -81,6 +82,10 @@ class Exporter: # us to export (both in the Age and Object Properties)... fun self._collect_objects() + # Step 2.1: Run through all the objects we collected in Step 2 and make sure there + # is no ruddy funny business going on. + self._check_sanity() + # Step 2.5: Run through all the objects we collected in Step 2 and see if any relationships # that the artist made requires something to have a CoordinateInterface self._harvest_actors() @@ -169,6 +174,20 @@ class Exporter: inc_progress() error.raise_if_error() + def _check_sanity(self): + self.report.progress_advance() + self.report.progress_range = len(self._objects) + inc_progress = self.report.progress_increment + + self.report.msg("\nEnsuring Age is sane...") + for bl_obj in self._objects: + for mod in bl_obj.plasma_modifiers.modifiers: + fn = getattr(mod, "sanity_check", None) + if fn is not None: + fn() + inc_progress() + self.report.msg("... Age is grinning and holding a spatula. Must be OK, then.") + def _export_age_info(self): # Make life slightly easier... age_info = bpy.context.scene.world.plasma_age