mirror of https://github.com/AxioDL/metaforce.git
ANCS cook fix after wildcard refactor
This commit is contained in:
parent
c8d44d181b
commit
b02b6a4d09
|
@ -147,10 +147,17 @@ bool SpecBase::canCook(const hecl::ProjectPath& path, hecl::BlenderToken& btok)
|
|||
{
|
||||
if (!checkPathPrefix(path))
|
||||
return false;
|
||||
if (hecl::IsPathBlend(path))
|
||||
|
||||
hecl::ProjectPath asBlend;
|
||||
if (path.getPathType() == hecl::ProjectPath::Type::Glob)
|
||||
asBlend = path.getWithExtension(_S(".blend"), true);
|
||||
else
|
||||
asBlend = path;
|
||||
|
||||
if (hecl::IsPathBlend(asBlend))
|
||||
{
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.openBlend(path))
|
||||
if (!conn.openBlend(asBlend))
|
||||
return false;
|
||||
if (conn.getBlendType() != hecl::BlenderConnection::BlendType::None)
|
||||
return true;
|
||||
|
@ -182,14 +189,21 @@ const hecl::Database::DataSpecEntry* SpecBase::overrideDataSpec(const hecl::Proj
|
|||
{
|
||||
if (!checkPathPrefix(path))
|
||||
return nullptr;
|
||||
if (hecl::IsPathBlend(path))
|
||||
|
||||
hecl::ProjectPath asBlend;
|
||||
if (path.getPathType() == hecl::ProjectPath::Type::Glob)
|
||||
asBlend = path.getWithExtension(_S(".blend"), true);
|
||||
else
|
||||
asBlend = path;
|
||||
|
||||
if (hecl::IsPathBlend(asBlend))
|
||||
{
|
||||
if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _S(".CSKR")) ||
|
||||
hecl::StringUtils::EndsWith(path.getAuxInfo(), _S(".ANIM")))
|
||||
return oldEntry;
|
||||
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.openBlend(path))
|
||||
if (!conn.openBlend(asBlend))
|
||||
{
|
||||
Log.report(logvisor::Error, _S("unable to cook '%s'"),
|
||||
path.getAbsolutePath().c_str());
|
||||
|
@ -211,10 +225,17 @@ void SpecBase::doCook(const hecl::ProjectPath& path, const hecl::ProjectPath& co
|
|||
bool fast, hecl::BlenderToken& btok, FCookProgress progress)
|
||||
{
|
||||
DataSpec::g_curSpec.reset(this);
|
||||
if (hecl::IsPathBlend(path))
|
||||
|
||||
hecl::ProjectPath asBlend;
|
||||
if (path.getPathType() == hecl::ProjectPath::Type::Glob)
|
||||
asBlend = path.getWithExtension(_S(".blend"), true);
|
||||
else
|
||||
asBlend = path;
|
||||
|
||||
if (hecl::IsPathBlend(asBlend))
|
||||
{
|
||||
hecl::BlenderConnection& conn = btok.getBlenderConnection();
|
||||
if (!conn.openBlend(path))
|
||||
if (!conn.openBlend(asBlend))
|
||||
return;
|
||||
switch (conn.getBlendType())
|
||||
{
|
||||
|
|
|
@ -70,8 +70,6 @@ void ProjectResourceFactoryBase::ReadCatalog(const hecl::ProjectPath& catalogPat
|
|||
|
||||
athena::io::YAMLNode& node = *p.second;
|
||||
hecl::ProjectPath path(m_proj->getProjectWorkingPath(), node.m_scalarString);
|
||||
if (node.m_scalarString == "MP1/SamGunFx/PowerBeam.wpsm.yaml")
|
||||
printf("");
|
||||
if (node.m_type == YAML_SCALAR_NODE)
|
||||
{
|
||||
path = hecl::ProjectPath(m_proj->getProjectWorkingPath(), node.m_scalarString);
|
||||
|
|
Loading…
Reference in New Issue