From 976549fea7e8fab2286815aa9e3031a8c6c1800d Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 8 May 2026 08:01:53 -0700 Subject: [PATCH] fix(editor): un-shadow project mesh detail view as -detail variant Batch 34's --list-project-meshes (per-zone aggregate) introduced a flag collision with a pre-existing per-mesh sorted listing that's been in the codebase. The dispatch chain ran the new handler first, leaving the older detail view as dead code. Resolves the duplicate by renaming the older handler to --list-project-meshes-detail. Both views are now reachable: the per-zone aggregate stays under the simpler name (covers the common "how heavy is each zone" case), and the per-mesh sorted-by-tris detail listing is back as -detail (used for project-wide outlier detection and mesh-sharing audits). --- tools/editor/main.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/editor/main.cpp b/tools/editor/main.cpp index cb01003e..549fadec 100644 --- a/tools/editor/main.cpp +++ b/tools/editor/main.cpp @@ -941,7 +941,7 @@ static void printUsage(const char* argv0) { std::printf(" Single-mesh detail: bounds, version, batches, bones, textures, attachments in one view\n"); std::printf(" --info-mesh-storage-budget [--json]\n"); std::printf(" Estimated bytes-per-category breakdown for a single WOM (vertices/indices/bones/...)\n"); - std::printf(" --list-project-meshes [--json]\n"); + std::printf(" --list-project-meshes-detail [--json]\n"); std::printf(" Per-mesh listing across every zone in a project (sorted by triangle count)\n"); std::printf(" --info-project-models-total [--json]\n"); std::printf(" Aggregate WOM/WOB stats across an entire project (per-zone breakdown + totals)\n"); @@ -1075,7 +1075,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", "--info-mesh", + "--list-zone-meshes", "--list-project-meshes-detail", "--info-mesh", "--info-mesh-storage-budget", "--info-wob", "--info-woc", "--info-wot", "--info-creatures", "--info-objects", "--info-quests", @@ -2676,16 +2676,17 @@ int main(int argc, char* argv[]) { r.path.c_str()); } return 0; - } else if (std::strcmp(argv[i], "--list-project-meshes") == 0 && i + 1 < argc) { - // Project-wide companion to --list-zone-meshes. Walks - // every zone in , collects every .wom across - // all zones, sorts by triangle count descending, and - // reports a global per-mesh table with the originating - // zone in the first column. + } else if (std::strcmp(argv[i], "--list-project-meshes-detail") == 0 && i + 1 < argc) { + // Per-mesh sorted listing across an entire project. + // Walks every zone in , collects every .wom, + // sorts by triangle count descending, and reports a + // global per-mesh table with the originating zone in + // the first column. // // Useful for project-wide outlier detection ("which mesh // anywhere in the project is the heaviest?") and for - // mesh-sharing audits. + // mesh-sharing audits. Companion to --list-project-meshes + // (which gives the per-zone aggregate view). std::string projectDir = argv[++i]; bool jsonOut = (i + 1 < argc && std::strcmp(argv[i + 1], "--json") == 0); @@ -2693,7 +2694,7 @@ int main(int argc, char* argv[]) { namespace fs = std::filesystem; if (!fs::exists(projectDir) || !fs::is_directory(projectDir)) { std::fprintf(stderr, - "list-project-meshes: %s is not a directory\n", + "list-project-meshes-detail: %s is not a directory\n", projectDir.c_str()); return 1; }