Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
Master update 4
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PredatorCZ committed Jul 7, 2019
1 parent 5b03e55 commit d0f76a4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion 3rd_party/HavokLib
11 changes: 9 additions & 2 deletions src/HavokImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions src/HavokMax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/HavokMax.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <vector>
#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;
Expand Down

0 comments on commit d0f76a4

Please sign in to comment.