From d0f76a4aaf809f99a5df68d9641e800517a38f72 Mon Sep 17 00:00:00 2001 From: Lukas Cone Date: Sun, 7 Jul 2019 18:00:24 +0200 Subject: [PATCH] Master update 4 Fixed loading incorrect animation track for bone without annotation name and bind remaps. Fixed loading spline compressed animations when float tracks are present. Added Motion ID var into config file. --- 3rd_party/HavokLib | 2 +- src/HavokImport.cpp | 11 +++++++++-- src/HavokMax.cpp | 2 ++ src/HavokMax.h | 4 ++-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/3rd_party/HavokLib b/3rd_party/HavokLib index 9d85442..51281c1 160000 --- a/3rd_party/HavokLib +++ b/3rd_party/HavokLib @@ -1 +1 @@ -Subproject commit 9d8544202d6e6b2887bfd3aaeddcff4aef7941af +Subproject commit 51281c1c66e6731d4417e40c7905960d6c388ff8 diff --git a/src/HavokImport.cpp b/src/HavokImport.cpp index 86d97db..e929a5c 100644 --- a/src/HavokImport.cpp +++ b/src/HavokImport.cpp @@ -300,9 +300,12 @@ void HavokImport::LoadAnimation(const hkaAnimation *ani, const hkaAnimationBindi node = GetCOREInterface()->GetINodeByName(boneName.c_str()); } - if (!node && bind) + if (!node) { - node = iBoneScanner.LookupNode(bind->GetTransformTrackToBoneIndex(curBone)); + if (bind && bind->GetNumTransformTrackToBoneIndices()) + node = iBoneScanner.LookupNode(bind->GetTransformTrackToBoneIndex(curBone)); + else + node = iBoneScanner.LookupNode(curBone); } if (!node) @@ -311,6 +314,10 @@ void HavokImport::LoadAnimation(const hkaAnimation *ani, const hkaAnimationBindi { printwarning("[Havok] Couldn't find bone: ", << boneName); } + else if (bind && bind->GetNumTransformTrackToBoneIndices()) + { + printwarning("[Havok] Couldn't find hkaBone: ", << bind->GetTransformTrackToBoneIndex(curBone)); + } else { printwarning("[Havok] Couldn't find hkaBone: ", << curBone); diff --git a/src/HavokMax.cpp b/src/HavokMax.cpp index 774dcbe..87615c7 100644 --- a/src/HavokMax.cpp +++ b/src/HavokMax.cpp @@ -253,6 +253,7 @@ void HavokMax::LoadCFG() GetCFGIndex(IDC_EDIT_ANIEND); GetCFGIndex(IDC_EDIT_ANISTART); GetCFGIndex(IDC_EDIT_CAPTUREFRAME); + GetCFGIndex(IDC_EDIT_MOTIONID); GetCFGChecked(IDC_CH_ANIMATION); GetCFGChecked(IDC_CH_ANISKELETON); GetCFGChecked(IDC_CH_ANIOPTIMIZE); @@ -295,6 +296,7 @@ void HavokMax::SaveCFG() SetCFGIndex(IDC_EDIT_ANIEND); SetCFGIndex(IDC_EDIT_ANISTART); SetCFGIndex(IDC_EDIT_CAPTUREFRAME); + SetCFGIndex(IDC_EDIT_MOTIONID); SetCFGChecked(IDC_CH_ANIMATION); SetCFGChecked(IDC_CH_ANISKELETON); SetCFGChecked(IDC_CH_ANIOPTIMIZE); diff --git a/src/HavokMax.h b/src/HavokMax.h index 35cbe92..942f5d6 100644 --- a/src/HavokMax.h +++ b/src/HavokMax.h @@ -33,8 +33,8 @@ #include #include "HavokXMLApi.hpp" -#define HAVOKMAX_VERSION 1.5 -#define HAVOKMAX_VERSIONINT 150 +#define HAVOKMAX_VERSION 1.6 +#define HAVOKMAX_VERSIONINT 160 extern TCHAR *GetString(int id); extern HINSTANCE hInstance;