From 2a341847d4aeef59d470141d0d4f994ba5959969 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 22 Dec 2017 19:40:50 -1000 Subject: [PATCH] ANIM cook variable scope fix --- DataSpec/DNAMP1/ANCS.cpp | 9 +++++++-- amuse | 2 +- hecl | 2 +- specter | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/DataSpec/DNAMP1/ANCS.cpp b/DataSpec/DNAMP1/ANCS.cpp index a3bec9ba7..a08658eec 100644 --- a/DataSpec/DNAMP1/ANCS.cpp +++ b/DataSpec/DNAMP1/ANCS.cpp @@ -1364,14 +1364,19 @@ bool ANCS::CookANIM(const hecl::ProjectPath& outPath, /* Build bone ID map */ std::unordered_map boneIdMap; + std::experimental::optional rigCinf; std::experimental::optional> 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); } } diff --git a/amuse b/amuse index 3eba4cc1a..4c2a26247 160000 --- a/amuse +++ b/amuse @@ -1 +1 @@ -Subproject commit 3eba4cc1ac7cf08c23107302807e6d1adf9087db +Subproject commit 4c2a26247886fd6b0baaef37d57b6c4ad78bf42b diff --git a/hecl b/hecl index fac818d9a..caf9749c1 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit fac818d9a0b4cf41934cb9b7f780fe87cafba293 +Subproject commit caf9749c101cde38bf0971d8afca5e3b62a98579 diff --git a/specter b/specter index 1100f5578..8f6a00fc3 160000 --- a/specter +++ b/specter @@ -1 +1 @@ -Subproject commit 1100f55788199d353e7310ed4427a655c7965255 +Subproject commit 8f6a00fc3c16b48bad5643db66e4a08c9afff749