RigInverter translation fix

This commit is contained in:
Jack Andersen 2016-04-08 13:21:41 -10:00
parent 0ff9794f94
commit 5a8b7c599a
2 changed files with 4 additions and 4 deletions

View File

@ -124,7 +124,7 @@ RigInverter<CINFType>::invertPosition(atUint32 boneId, const zeus::CVector3f& or
zeus::CVector3f localPos = origPos; zeus::CVector3f localPos = origPos;
if (subDelta) if (subDelta)
localPos -= b.m_parentDelta; localPos -= b.m_parentDelta;
return b.m_inverter * localPos; return b.m_restorer * localPos;
} }
return origPos; return origPos;
} }
@ -146,7 +146,7 @@ RigInverter<CINFType>::restorePosition(atUint32 boneId, const zeus::CVector3f& o
for (const Bone& b : m_bones) for (const Bone& b : m_bones)
if (b.m_origBone.id == boneId) if (b.m_origBone.id == boneId)
{ {
zeus::CVector3f localPos = b.m_restorer * origPos; zeus::CVector3f localPos = b.m_inverter * origPos;
if (subDelta) if (subDelta)
localPos += b.m_parentDelta; localPos += b.m_parentDelta;
return localPos; return localPos;

View File

@ -59,7 +59,7 @@ void ANIM::IANIM::sendANIMToBlender(hecl::BlenderConnection::PyOutStream& os, co
{ {
size_t idx = 0; size_t idx = 0;
for (const DNAANIM::Value& val : rotKeys) for (const DNAANIM::Value& val : rotKeys)
fixedRotKeys.at(idx++)[c] = val.v4.vec[c]; fixedRotKeys[idx++][c] = val.v4.vec[c];
} }
for (zeus::CQuaternion& rot : fixedRotKeys) for (zeus::CQuaternion& rot : fixedRotKeys)
@ -84,7 +84,7 @@ void ANIM::IANIM::sendANIMToBlender(hecl::BlenderConnection::PyOutStream& os, co
{ {
size_t idx = 0; size_t idx = 0;
for (const DNAANIM::Value& val : transKeys) for (const DNAANIM::Value& val : transKeys)
fixedTransKeys.at(idx++)[c] = val.v3.vec[c]; fixedTransKeys[idx++][c] = val.v3.vec[c];
} }
for (zeus::CVector3f& t : fixedTransKeys) for (zeus::CVector3f& t : fixedTransKeys)