Browse Source

More log tweaking...

pull/6/head
Adam Johnson 11 years ago
parent
commit
a2bde5ff28
  1. 8
      korman/exporter/convert.py
  2. 4
      korman/exporter/mesh.py

8
korman/exporter/convert.py

@ -16,6 +16,7 @@
import bpy import bpy
import os.path import os.path
from PyHSPlasma import * from PyHSPlasma import *
import time
from . import explosions from . import explosions
from . import logger from . import logger
@ -35,6 +36,7 @@ class Exporter:
def run(self): def run(self):
with logger.ExportLogger("{}_export.log".format(self.age_name)) as _log: with logger.ExportLogger("{}_export.log".format(self.age_name)) as _log:
print("Exporting '{}.age'".format(self.age_name)) print("Exporting '{}.age'".format(self.age_name))
start = time.process_time()
# Step 0: Init export resmgr and stuff # Step 0: Init export resmgr and stuff
self.mgr = manager.ExportManager(globals()[self._op.version]) self.mgr = manager.ExportManager(globals()[self._op.version])
@ -67,6 +69,10 @@ class Exporter:
# these little warnings and notices. # these little warnings and notices.
self.report.save() 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): def _collect_objects(self):
for obj in bpy.data.objects: for obj in bpy.data.objects:
if obj.plasma_object.enabled: if obj.plasma_object.enabled:
@ -125,7 +131,7 @@ class Exporter:
def _export_scene_objects(self): def _export_scene_objects(self):
for bl_obj in self._objects: 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. # First pass: do things specific to this object type.
# note the function calls: to export a MESH, it's _export_mesh_blobj # note the function calls: to export a MESH, it's _export_mesh_blobj

4
korman/exporter/mesh.py

@ -121,11 +121,11 @@ class MeshConverter:
def finalize(self): def finalize(self):
"""Prepares all baked Plasma geometry to be flushed to the disk""" """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 loc in self._dspans.values():
for dspan in loc.values(): for dspan in loc.values():
print(" Finalizing DSpan: '{}'".format(dspan.key.name)) print(" ... {} ...".format(dspan.key.name))
# This mega-function does a lot: # This mega-function does a lot:
# 1. Converts SourceSpans (geospans) to Icicles and bakes geometry into plGBuffers # 1. Converts SourceSpans (geospans) to Icicles and bakes geometry into plGBuffers

Loading…
Cancel
Save