From 2c97257b8db00d5f267ddd59045eac5276bddea4 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Tue, 17 Jun 2014 20:11:33 -0400 Subject: [PATCH] Tweak debug output --- korman/exporter/convert.py | 7 +++---- korman/exporter/mesh.py | 6 ++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/korman/exporter/convert.py b/korman/exporter/convert.py index 3879ae2..b6d0dcd 100644 --- a/korman/exporter/convert.py +++ b/korman/exporter/convert.py @@ -36,6 +36,8 @@ class Exporter: def run(self): with logger.ExportLogger("{}_export.log".format(self.age_name)) as _log: + print("Exporting '{}.age'".format(self.age_name)) + # Step 0: Init export resmgr and stuff self.mgr = manager.ExportManager(globals()[self._op.version]) self.mesh = mesh.MeshConverter(self.mgr) @@ -126,7 +128,7 @@ class Exporter: def _export_scene_objects(self): for bl_obj in self._objects: - print("=== Exporting plSceneObject ===") + print("\n=== Exporting plSceneObject ===") # First pass: do things specific to this object type. # note the function calls: to export a MESH, it's _export_mesh_blobj @@ -146,9 +148,6 @@ class Exporter: self._export_actor(sceneobject, bl_obj) export_fn(sceneobject, bl_obj) - # :( - print() - def _export_empty_blobj(self, so, bo): # We don't need to do anything here. This function just makes sure we don't error out # or add a silly special case :( diff --git a/korman/exporter/mesh.py b/korman/exporter/mesh.py index 53e90c8..dd864bb 100644 --- a/korman/exporter/mesh.py +++ b/korman/exporter/mesh.py @@ -103,9 +103,11 @@ class MeshConverter: def finalize(self): """Prepares all baked Plasma geometry to be flushed to the disk""" + print("\n=== Finalizing Geometry ===") + for loc in self._dspans.values(): for dspan in loc.values(): - print("Finalizing DSpan: {}".format(dspan.key.name)) + print("\tFinalizing DSpan: '{}'".format(dspan.key.name)) # This mega-function does a lot: # 1. Converts SourceSpans (geospans) to Icicles and bakes geometry into plGBuffers @@ -130,7 +132,6 @@ class MeshConverter: vertex.color = hsColor32(red=255, green=0, blue=0, alpha=255) # FIXME trollface.jpg testing hacks vertex.normal = utils.vector3(source.normal) vertex.position = utils.vector3(source.co) - print(vertex.position) geoverts[i] = vertex # Convert Blender faces into things we can stuff into libHSPlasma @@ -196,6 +197,7 @@ class MeshConverter: _diindices = {} for geospan in geospans: dspan = self._find_create_dspan(bo, geospan.material.object) + print("\tExported hsGMaterial '{}' geometry into '{}'".format(geospan.material.name, dspan.key.name)) idx = dspan.addSourceSpan(geospan) if dspan not in _diindices: _diindices[dspan] = [idx,]