From fa51768e6543b8ea248e3815c02b2f46858c5c1e Mon Sep 17 00:00:00 2001 From: Colin Basnett Date: Fri, 20 Sep 2024 11:42:47 -0700 Subject: [PATCH] ASE export success message now displays some stats about the ASE file (material count, face count etc.) --- io_scene_ase/exporter.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/io_scene_ase/exporter.py b/io_scene_ase/exporter.py index bddbea8..50856db 100644 --- a/io_scene_ase/exporter.py +++ b/io_scene_ase/exporter.py @@ -334,8 +334,15 @@ def execute(self, context): options.should_invert_normals = pg.should_invert_normals try: ase = build_ase(context, options, context.selected_objects) + + # Calculate some statistics about the ASE file to display in the console. + object_count = len(ase.geometry_objects) + material_count = len(ase.materials) + vertex_count = sum(len(x.vertices) for x in ase.geometry_objects) + face_count = sum(len(x.faces) for x in ase.geometry_objects) + ASEWriter().write(self.filepath, ase) - self.report({'INFO'}, 'ASE exported successfully') + self.report({'INFO'}, f'ASE exported successfully ({object_count} objects, {material_count} materials, {face_count} faces, {vertex_count} vertices)') return {'FINISHED'} except ASEBuildError as e: self.report({'ERROR'}, str(e))