From 155bb1619ca9fd98d9ea2de539fe2bb2e0ea7aec Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 8 May 2026 19:28:18 -0700 Subject: [PATCH] fix(editor): un-shadow zone mesh detail view as -detail variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the --list-project-meshes-detail rename from 976549fe. After the c0f2ab75 inventory extraction, the older per-mesh sorted-by-tris listing was shadowed by the per-zone aggregate that now lives in cli_zone_inventory.cpp. Renames the older handler to --list-zone-meshes-detail (and updates its help text + kArgRequired entry) so both views coexist: --list-zone-meshes — per-zone aggregate (extracted) --list-zone-meshes-detail — sorted-by-tris listing Removes the last duplicate-flag dead code from main.cpp. --- tools/editor/main.cpp | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tools/editor/main.cpp b/tools/editor/main.cpp index f78369cc..4f59f34c 100644 --- a/tools/editor/main.cpp +++ b/tools/editor/main.cpp @@ -976,8 +976,8 @@ static void printUsage(const char* argv0) { std::printf(" Aggregate texture refs across all WOM models in a zone (deduped)\n"); std::printf(" --info-zone-models-total [--json]\n"); std::printf(" Aggregate WOM/WOB stats across a zone (verts, tris, bones, batches, doodads)\n"); - std::printf(" --list-zone-meshes [--json]\n"); - std::printf(" Per-mesh listing of every .wom in a zone (verts, tris, bones, textures, bytes)\n"); + std::printf(" --list-zone-meshes-detail [--json]\n"); + std::printf(" Per-mesh listing of every .wom in a zone, sorted by triangle count\n"); std::printf(" --info-mesh [--json]\n"); std::printf(" Single-mesh detail: bounds, version, batches, bones, textures, attachments in one view\n"); std::printf(" --info-mesh-storage-budget [--json]\n"); @@ -1116,7 +1116,7 @@ int main(int argc, char* argv[]) { "--list-project-meshes", "--list-project-audio", "--list-project-textures", "--info-zone-models-total", "--info-project-models-total", - "--list-zone-meshes", "--list-project-meshes-detail", "--info-mesh", + "--list-zone-meshes-detail", "--list-project-meshes-detail", "--info-mesh", "--info-mesh-storage-budget", "--info-wob", "--info-woc", "--info-wot", "--info-creatures", "--info-objects", "--info-quests", @@ -2045,15 +2045,14 @@ int main(int argc, char* argv[]) { std::printf(" vertices : %llu\n", static_cast(womVerts + wobVerts)); std::printf(" triangles : %llu\n", static_cast((womIndices + wobIndices) / 3)); return 0; - } else if (std::strcmp(argv[i], "--list-zone-meshes") == 0 && i + 1 < argc) { - // Per-mesh breakdown of every .wom file in . - // Complements --info-zone-models-total (aggregate) - // by surfacing individual mesh metrics — useful for - // spotting outliers ("which mesh is using 80% of my - // triangle budget?") and for content audits. - // - // Sorted by triangle count descending so the heaviest - // meshes float to the top of the table. + } else if (std::strcmp(argv[i], "--list-zone-meshes-detail") == 0 && i + 1 < argc) { + // Per-mesh breakdown of every .wom file in , + // sorted by triangle count descending so the heaviest + // meshes float to the top. Complements + // --list-zone-meshes (per-zone summary) by surfacing + // individual mesh metrics — useful for spotting + // outliers ("which mesh is using 80% of my triangle + // budget?") and for content audits. std::string zoneDir = argv[++i]; bool jsonOut = (i + 1 < argc && std::strcmp(argv[i + 1], "--json") == 0); @@ -2061,7 +2060,7 @@ int main(int argc, char* argv[]) { namespace fs = std::filesystem; if (!fs::exists(zoneDir)) { std::fprintf(stderr, - "list-zone-meshes: %s does not exist\n", zoneDir.c_str()); + "list-zone-meshes-detail: %s does not exist\n", zoneDir.c_str()); return 1; } struct Row {