From f1223cfc690010fb728f7c01b7b2366b8b88be31 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 6 May 2026 02:03:30 -0700 Subject: [PATCH] chore(editor): cap texture-not-found warnings at 5 with suppression count Character body/skin textures live in CharSections-composed paths that don't exist as standalone BLPs. Exporting a zone with many character NPCs would spam hundreds of warnings. Now logs the first 5, suppresses the rest, and reports the total skipped count in the summary line. --- tools/editor/texture_exporter.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/editor/texture_exporter.cpp b/tools/editor/texture_exporter.cpp index e34bcf6b..c79ce0be 100644 --- a/tools/editor/texture_exporter.cpp +++ b/tools/editor/texture_exporter.cpp @@ -95,10 +95,14 @@ int TextureExporter::exportTexturesAsPng(pipeline::AssetManager* am, namespace fs = std::filesystem; int exported = 0; + int notFound = 0; for (const auto& texPath : texturePaths) { auto blpImage = am->loadTexture(texPath); if (!blpImage.isValid()) { - LOG_WARNING("Texture not found or invalid: ", texPath); + // Many character/dynamic textures legitimately don't exist as files + // (composed at runtime from CharSections.dbc); don't spam. + ++notFound; + if (notFound <= 5) LOG_WARNING("Texture not found or invalid: ", texPath); continue; } @@ -125,7 +129,8 @@ int TextureExporter::exportTexturesAsPng(pipeline::AssetManager* am, } } - LOG_INFO("Exported ", exported, "/", texturePaths.size(), " textures as PNG to ", outputDir); + LOG_INFO("Exported ", exported, "/", texturePaths.size(), " textures as PNG to ", outputDir, + notFound > 5 ? " (" + std::to_string(notFound - 5) + " more not-found warnings suppressed)" : ""); return exported; }