I found the hkaSkeletonUtils::lockTranslation function which seems to set the bones to have locked translations.
However, when I then call enforceSkeletonConstraintsModelSpace (or local space) I get some asserts:
Here is the output window:
HAVOK: .\Rig\hkaPose.cpp(368): [0x5A3281F6] Assert : 0
Invariant failed : both local and model transforms dirty for bone 2
HAVOK: e:\RSYS\Build\code\PcXsPerpetualKeycode\Source\Common/Base/Memory/StackTracer/Impl/hkStackTracerWin32.cxx(91): [0x44B27798] Assert : initsymbols
The call stack looks like this:
test-d.exe!hkStackTracer::hkStackTracer() + 0x503 bytes
test-d.exe!hkDefaultError::showMessage() + 0x7b bytes
test-d.exe!hkDefaultError::message() + 0x92 bytes
test-d.exe!hkaPose::checkPoseValidity() + 0x1cc bytes
test-d.exe!hkaPose::enforceSkeletonConstraintsLocalSpace() + 0x232 bytes
I hope that helps. I have a feeling I'm just not calling things in the right order, but I'm not sure what the order should be.
I also get this assert:
HAVOK: .\Rig\hkaPose.cpp(382): [0x5A3281F4] Assert : 0
Invariant failed : m_localInSync is true but some local transforms are dirty
HAVOK: e:\RSYS\Build\code\PcXsPerpetualKeycode\Source\Common/Base/Memory/StackTracer/Impl/hkStackTracerWin32.cxx(91): [0x44B27798] Assert : initsymbols
with call stack:
> Elemental-d.exe!hkStackTracer::hkStackTracer() + 0x503 bytes
If I don't call hkaSkeletonUtils::lockTranslations, then I don't get any of these asserts, but the skeleton translations arent locked either :(