ANIM cook variable scope fix

This commit is contained in:
Jack Andersen 2017-12-22 19:40:50 -10:00
parent 053ebd41c4
commit 2a341847d4
4 changed files with 10 additions and 5 deletions

View File

@ -1364,14 +1364,19 @@ bool ANCS::CookANIM(const hecl::ProjectPath& outPath,
/* Build bone ID map */
std::unordered_map<std::string, atInt32> boneIdMap;
std::experimental::optional<CINF> rigCinf;
std::experimental::optional<DNAANIM::RigInverter<CINF>> rigInv;
for (const DNAANCS::Actor::Armature& arm : actor.armatures)
{
CINF cinf(arm, boneIdMap);
if (!rigInv)
{
rigCinf.emplace(arm, boneIdMap);
auto matrices = ds.getBoneMatrices(arm.name);
rigInv.emplace(cinf, matrices);
rigInv.emplace(*rigCinf, matrices);
}
else
{
CINF cinf(arm, boneIdMap);
}
}

2
amuse

@ -1 +1 @@
Subproject commit 3eba4cc1ac7cf08c23107302807e6d1adf9087db
Subproject commit 4c2a26247886fd6b0baaef37d57b6c4ad78bf42b

2
hecl

@ -1 +1 @@
Subproject commit fac818d9a0b4cf41934cb9b7f780fe87cafba293
Subproject commit caf9749c101cde38bf0971d8afca5e3b62a98579

@ -1 +1 @@
Subproject commit 1100f55788199d353e7310ed4427a655c7965255
Subproject commit 8f6a00fc3c16b48bad5643db66e4a08c9afff749