From 5506fd155b9be07cafc9b8f8d76110f1c0edcd73 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 5 May 2026 23:25:57 -0700 Subject: [PATCH] fix(editor): all NPC loading messages now WARNING level (were DEBUG) NPC model loading diagnostics were at LOG_DEBUG level which doesn't appear in the default log output. Changed all NPC model loading messages to LOG_WARNING/LOG_INFO: - "NPC model file not found" now WARNING (was DEBUG, invisible) - "NPC has empty modelPath" new WARNING for missing model selection - "Loading N NPC models..." at loop entry to confirm rebuild runs - "NPC M2 loaded" at INFO level shows successful loads This will reveal exactly where the NPC rendering pipeline fails. --- tools/editor/editor_viewport.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/editor/editor_viewport.cpp b/tools/editor/editor_viewport.cpp index 212fcf1c..0fa55775 100644 --- a/tools/editor/editor_viewport.cpp +++ b/tools/editor/editor_viewport.cpp @@ -274,9 +274,10 @@ void EditorViewport::rebuildObjects(const std::vector& objects, } // Render NPC creatures as M2 instances - if (m2Renderer_) { + if (m2Renderer_ && !npcs.empty()) { + LOG_INFO("Loading ", npcs.size(), " NPC models..."); for (const auto& npc : npcs) { - if (npc.modelPath.empty()) continue; + if (npc.modelPath.empty()) { LOG_WARNING("NPC has empty modelPath: ", npc.name); continue; } uint32_t modelId; auto it = m2ModelIds.find(npc.modelPath); if (it != m2ModelIds.end()) { @@ -331,7 +332,7 @@ void EditorViewport::rebuildObjects(const std::vector& objects, if (!loaded) { auto data = assetManager_->readFile(npc.modelPath); if (data.empty()) { - LOG_DEBUG("NPC model file not found: ", npc.modelPath); + LOG_WARNING("NPC model file not found: ", npc.modelPath); continue; } model = pipeline::M2Loader::load(data);