From a2bde5ff2809172779b014af9ae774eff41d87dc Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 11 Jul 2014 18:09:24 -0400 Subject: [PATCH] More log tweaking... --- korman/exporter/convert.py | 8 +++++++- korman/exporter/mesh.py | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/korman/exporter/convert.py b/korman/exporter/convert.py index 2bf8fbb..84b9482 100644 --- a/korman/exporter/convert.py +++ b/korman/exporter/convert.py @@ -16,6 +16,7 @@ import bpy import os.path from PyHSPlasma import * +import time from . import explosions from . import logger @@ -35,6 +36,7 @@ class Exporter: def run(self): with logger.ExportLogger("{}_export.log".format(self.age_name)) as _log: print("Exporting '{}.age'".format(self.age_name)) + start = time.process_time() # Step 0: Init export resmgr and stuff self.mgr = manager.ExportManager(globals()[self._op.version]) @@ -67,6 +69,10 @@ class Exporter: # these little warnings and notices. self.report.save() + # And finally we crow about how awesomely fast we are... + end = time.process_time() + print("\nExported {}.age in {:.2f} seconds".format(self.age_name, end-start)) + def _collect_objects(self): for obj in bpy.data.objects: if obj.plasma_object.enabled: @@ -125,7 +131,7 @@ class Exporter: def _export_scene_objects(self): for bl_obj in self._objects: - print("\n=== Exporting plSceneObject ===") + print("\n[SceneObject '{}']".format(bl_obj.name)) # First pass: do things specific to this object type. # note the function calls: to export a MESH, it's _export_mesh_blobj diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index 76edb23..6b0e684 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -121,11 +121,11 @@ class MeshConverter: def finalize(self): """Prepares all baked Plasma geometry to be flushed to the disk""" - print("\n=== Finalizing Geometry ===") + print("\nFinalizing Geometry...") for loc in self._dspans.values(): for dspan in loc.values(): - print(" Finalizing DSpan: '{}'".format(dspan.key.name)) + print(" ... {} ...".format(dspan.key.name)) # This mega-function does a lot: # 1. Converts SourceSpans (geospans) to Icicles and bakes geometry into plGBuffers