mirror of https://github.com/AxioDL/metaforce.git
Extract directory selection fix
This commit is contained in:
parent
0e23ca481b
commit
d0404680fd
|
@ -45,7 +45,7 @@ bool ReadANCSToBlender(HECL::BlenderConnection& conn,
|
||||||
for (const auto& info : chResInfo)
|
for (const auto& info : chResInfo)
|
||||||
{
|
{
|
||||||
const NOD::Node* node;
|
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)
|
if (cmdlE)
|
||||||
{
|
{
|
||||||
HECL::ProjectPath cmdlPath = pakRouter.getWorking(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";
|
os << "actor_subtype.linked_armature = arm_obj.name\n";
|
||||||
|
|
||||||
/* Link CMDL */
|
/* 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)
|
if (cmdlE)
|
||||||
{
|
{
|
||||||
HECL::ProjectPath cmdlPath = pakRouter.getWorking(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());
|
os.format("overlay.name = '%s'\n", overlay.first.toString().c_str());
|
||||||
|
|
||||||
/* Link CMDL */
|
/* 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)
|
if (cmdlE)
|
||||||
{
|
{
|
||||||
HECL::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
|
HECL::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
|
||||||
|
|
|
@ -1042,6 +1042,7 @@ bool WriteCMDL(const HECL::ProjectPath& outPath, const HECL::ProjectPath& inPath
|
||||||
/* Build material sets */
|
/* Build material sets */
|
||||||
{
|
{
|
||||||
HECL::Frontend::Frontend FE;
|
HECL::Frontend::Frontend FE;
|
||||||
|
FE.getDiagnostics().setBackend("GX");
|
||||||
for (const std::vector<Mesh::Material>& mset : mesh.materialSets)
|
for (const std::vector<Mesh::Material>& mset : mesh.materialSets)
|
||||||
{
|
{
|
||||||
for (const Mesh::Material& mat : mset)
|
for (const Mesh::Material& mat : mset)
|
||||||
|
|
|
@ -355,6 +355,7 @@ public:
|
||||||
return HECL::ProjectPath(pakPath, entName);
|
return HECL::ProjectPath(pakPath, entName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto uniqueSearch = m_uniqueEntries.find(entry->id);
|
auto uniqueSearch = m_uniqueEntries.find(entry->id);
|
||||||
if (uniqueSearch != m_uniqueEntries.end())
|
if (uniqueSearch != m_uniqueEntries.end())
|
||||||
{
|
{
|
||||||
|
@ -370,6 +371,7 @@ public:
|
||||||
entName += extractor.fileExts[0];
|
entName += extractor.fileExts[0];
|
||||||
return HECL::ProjectPath(uniquePath, entName);
|
return HECL::ProjectPath(uniquePath, entName);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto sharedSearch = m_sharedEntries.find(entry->id);
|
auto sharedSearch = m_sharedEntries.find(entry->id);
|
||||||
if (sharedSearch != m_sharedEntries.end())
|
if (sharedSearch != m_sharedEntries.end())
|
||||||
{
|
{
|
||||||
|
@ -405,6 +407,7 @@ public:
|
||||||
m_sharedWorking.makeDir();
|
m_sharedWorking.makeDir();
|
||||||
return sharedPath;
|
return sharedPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogDNACommon.report(LogVisor::FatalError, "Unable to find entry %s", entry->id.toString().c_str());
|
LogDNACommon.report(LogVisor::FatalError, "Unable to find entry %s", entry->id.toString().c_str());
|
||||||
return HECL::ProjectPath();
|
return HECL::ProjectPath();
|
||||||
}
|
}
|
||||||
|
@ -553,11 +556,13 @@ public:
|
||||||
|
|
||||||
const typename BRIDGETYPE::PAKType::Entry* lookupEntry(const IDType& entry,
|
const typename BRIDGETYPE::PAKType::Entry* lookupEntry(const IDType& entry,
|
||||||
const NOD::Node** nodeOut=nullptr,
|
const NOD::Node** nodeOut=nullptr,
|
||||||
bool silenceWarnings=false) const
|
bool silenceWarnings=false,
|
||||||
|
bool currentPAK=false) const
|
||||||
{
|
{
|
||||||
if (!m_bridges)
|
if (!m_bridges)
|
||||||
LogDNACommon.report(LogVisor::FatalError,
|
LogDNACommon.report(LogVisor::FatalError,
|
||||||
"PAKRouter::build() must be called before PAKRouter::lookupEntry()");
|
"PAKRouter::build() must be called before PAKRouter::lookupEntry()");
|
||||||
|
|
||||||
if (m_pak)
|
if (m_pak)
|
||||||
{
|
{
|
||||||
const EntryType* ent = m_pak->lookupEntry(entry);
|
const EntryType* ent = m_pak->lookupEntry(entry);
|
||||||
|
@ -568,6 +573,14 @@ public:
|
||||||
return ent;
|
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)
|
for (const BRIDGETYPE& bridge : *m_bridges)
|
||||||
{
|
{
|
||||||
const PAKType& pak = bridge.getPAK();
|
const PAKType& pak = bridge.getPAK();
|
||||||
|
@ -579,6 +592,7 @@ public:
|
||||||
return ent;
|
return ent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!silenceWarnings)
|
if (!silenceWarnings)
|
||||||
LogDNACommon.report(LogVisor::Warning, "unable to find PAK entry %s", entry.toString().c_str());
|
LogDNACommon.report(LogVisor::Warning, "unable to find PAK entry %s", entry.toString().c_str());
|
||||||
if (nodeOut)
|
if (nodeOut)
|
||||||
|
|
|
@ -345,6 +345,9 @@ struct MaterialSet : BigDNA
|
||||||
{
|
{
|
||||||
DNACMDL::ReadMaterialSetToBlender_1_2(os, *this, pakRouter, entry, setIdx);
|
DNACMDL::ReadMaterialSetToBlender_1_2(os, *this, pakRouter, entry, setIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MaterialSet() = default;
|
||||||
|
MaterialSet(const HECL::Backend::GX& gx);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 1c6a7be8302dfd1bafd6ba8fc1d82c88bcf6048c
|
Subproject commit 808006875cd237ebd7c9a6ae6b6b0b9391f3da9f
|
Loading…
Reference in New Issue