diff --git a/DataSpec/DNACommon/ANCS.hpp b/DataSpec/DNACommon/ANCS.hpp index e45dd281a..03d36e5d9 100644 --- a/DataSpec/DNACommon/ANCS.hpp +++ b/DataSpec/DNACommon/ANCS.hpp @@ -32,20 +32,6 @@ struct AnimationResInfo bool additive; }; -static void WriteOutAnimId(athena::io::YAMLDocWriter& __dna_docout, - const UniqueID32& ancsId, - const std::string& animName) -{ - __dna_docout.enterSubRecord("animId"); - hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(ancsId); - if (path) - { - path = path.getWithExtension(_S(".blend")); - __dna_docout.writeString(nullptr, path.getRelativePathUTF8() + _S('|') + animName); - } - __dna_docout.leaveSubRecord(); -} - template bool ReadANCSToBlender(hecl::BlenderConnection& conn, const ANCSDNA& ancs, diff --git a/DataSpec/DNAMP1/ANCS.hpp b/DataSpec/DNAMP1/ANCS.hpp index 0a5ecc66e..0ae0c4291 100644 --- a/DataSpec/DNAMP1/ANCS.hpp +++ b/DataSpec/DNAMP1/ANCS.hpp @@ -230,8 +230,6 @@ struct ANCS : BigYAML void read(athena::io::YAMLDocReader& __dna_docin) { - /* animId */ - __dna_docin.enumerate("animId", animId); /* animIdx */ animIdx = __dna_docin.readUint32("animIdx"); /* animName */ @@ -240,12 +238,17 @@ struct ANCS : BigYAML unk1 = __dna_docin.readFloat("unk1"); /* unk2 */ unk2 = __dna_docin.readUint32("unk2"); + + hecl::ProjectPath path = UniqueIDBridge::TranslatePakIdToPath(m_ancsId); + if (path) + { + hecl::SystemStringView sysView(animName); + animId = path.ensureAuxInfo(sysView.sys_str().c_str()); + } } void write(athena::io::YAMLDocWriter& __dna_docout) const { - /* animId */ - DNAANCS::WriteOutAnimId(__dna_docout, m_ancsId, animName); /* animIdx */ __dna_docout.writeUint32("animIdx", animIdx); /* animName */