diff --git a/DataSpec/DNACommon/ANCS.hpp b/DataSpec/DNACommon/ANCS.hpp index f1b429ed1..58dc31943 100644 --- a/DataSpec/DNACommon/ANCS.hpp +++ b/DataSpec/DNACommon/ANCS.hpp @@ -45,7 +45,7 @@ bool ReadANCSToBlender(HECL::BlenderConnection& conn, for (const auto& info : chResInfo) { const NOD::Node* node; - const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(info.cmdl, &node, true); + const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(info.cmdl, &node, true, true); if (cmdlE) { HECL::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE); @@ -119,7 +119,7 @@ bool ReadANCSToBlender(HECL::BlenderConnection& conn, os << "actor_subtype.linked_armature = arm_obj.name\n"; /* Link CMDL */ - const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(info.cmdl, nullptr, true); + const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(info.cmdl, nullptr, true, true); if (cmdlE) { HECL::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE); @@ -140,7 +140,7 @@ bool ReadANCSToBlender(HECL::BlenderConnection& conn, os.format("overlay.name = '%s'\n", overlay.first.toString().c_str()); /* Link CMDL */ - const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(overlay.second.first, nullptr, true); + const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(overlay.second.first, nullptr, true, true); if (cmdlE) { HECL::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE); diff --git a/DataSpec/DNACommon/CMDL.hpp b/DataSpec/DNACommon/CMDL.hpp index db3ac0dd7..051b7701e 100644 --- a/DataSpec/DNACommon/CMDL.hpp +++ b/DataSpec/DNACommon/CMDL.hpp @@ -1042,6 +1042,7 @@ bool WriteCMDL(const HECL::ProjectPath& outPath, const HECL::ProjectPath& inPath /* Build material sets */ { HECL::Frontend::Frontend FE; + FE.getDiagnostics().setBackend("GX"); for (const std::vector& mset : mesh.materialSets) { for (const Mesh::Material& mat : mset) diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp index e0835c634..7ddbc3c14 100644 --- a/DataSpec/DNACommon/PAK.hpp +++ b/DataSpec/DNACommon/PAK.hpp @@ -355,6 +355,7 @@ public: return HECL::ProjectPath(pakPath, entName); } } + auto uniqueSearch = m_uniqueEntries.find(entry->id); if (uniqueSearch != m_uniqueEntries.end()) { @@ -370,6 +371,7 @@ public: entName += extractor.fileExts[0]; return HECL::ProjectPath(uniquePath, entName); } + auto sharedSearch = m_sharedEntries.find(entry->id); if (sharedSearch != m_sharedEntries.end()) { @@ -405,6 +407,7 @@ public: m_sharedWorking.makeDir(); return sharedPath; } + LogDNACommon.report(LogVisor::FatalError, "Unable to find entry %s", entry->id.toString().c_str()); return HECL::ProjectPath(); } @@ -553,11 +556,13 @@ public: const typename BRIDGETYPE::PAKType::Entry* lookupEntry(const IDType& entry, const NOD::Node** nodeOut=nullptr, - bool silenceWarnings=false) const + bool silenceWarnings=false, + bool currentPAK=false) const { if (!m_bridges) LogDNACommon.report(LogVisor::FatalError, "PAKRouter::build() must be called before PAKRouter::lookupEntry()"); + if (m_pak) { const EntryType* ent = m_pak->lookupEntry(entry); @@ -568,6 +573,14 @@ public: return ent; } } + + if (currentPAK) + { + if (!silenceWarnings) + LogDNACommon.report(LogVisor::Warning, "unable to find PAK entry %s in current PAK", entry.toString().c_str()); + return nullptr; + } + for (const BRIDGETYPE& bridge : *m_bridges) { const PAKType& pak = bridge.getPAK(); @@ -579,6 +592,7 @@ public: return ent; } } + if (!silenceWarnings) LogDNACommon.report(LogVisor::Warning, "unable to find PAK entry %s", entry.toString().c_str()); if (nodeOut) diff --git a/DataSpec/DNAMP1/CMDLMaterials.hpp b/DataSpec/DNAMP1/CMDLMaterials.hpp index c020f345a..4b7f9b049 100644 --- a/DataSpec/DNAMP1/CMDLMaterials.hpp +++ b/DataSpec/DNAMP1/CMDLMaterials.hpp @@ -345,6 +345,9 @@ struct MaterialSet : BigDNA { DNACMDL::ReadMaterialSetToBlender_1_2(os, *this, pakRouter, entry, setIdx); } + + MaterialSet() = default; + MaterialSet(const HECL::Backend::GX& gx); }; } diff --git a/hecl b/hecl index 1c6a7be83..808006875 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 1c6a7be8302dfd1bafd6ba8fc1d82c88bcf6048c +Subproject commit 808006875cd237ebd7c9a6ae6b6b0b9391f3da9f