2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-09-24 00:59:36 +00:00
|
|
|
|
|
|
|
#include "DNAMP3.hpp"
|
2018-06-29 20:21:36 +00:00
|
|
|
#include "DataSpec/DNACommon/ANIM.hpp"
|
|
|
|
#include "DataSpec/DNACommon/RigInverter.hpp"
|
2015-09-24 00:59:36 +00:00
|
|
|
#include "CINF.hpp"
|
2018-10-28 01:22:55 +00:00
|
|
|
#include "DataSpec/DNACommon/ANCS.hpp"
|
2015-09-24 00:59:36 +00:00
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
namespace DataSpec::DNAMP3
|
2015-09-24 00:59:36 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
struct ANIM : BigDNA
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_EXPLICIT_DNA
|
2015-09-24 00:59:36 +00:00
|
|
|
|
2018-02-22 07:24:51 +00:00
|
|
|
struct IANIM : BigDNAV
|
2015-09-24 00:59:36 +00:00
|
|
|
{
|
|
|
|
Delete expl;
|
|
|
|
atUint32 m_version;
|
|
|
|
IANIM(atUint32 version) : m_version(version) {}
|
|
|
|
|
|
|
|
std::vector<std::pair<atUint32, std::tuple<bool,bool,bool>>> bones;
|
|
|
|
std::vector<atUint32> frames;
|
|
|
|
std::vector<DNAANIM::Channel> channels;
|
|
|
|
std::vector<std::vector<DNAANIM::Value>> chanKeys;
|
|
|
|
float mainInterval = 0.0;
|
2016-09-06 05:52:51 +00:00
|
|
|
bool looping = false;
|
2015-09-24 00:59:36 +00:00
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
void sendANIMToBlender(hecl::blender::PyOutStream&,
|
2016-09-06 05:52:51 +00:00
|
|
|
const DNAANIM::RigInverter<CINF>& rig,
|
|
|
|
bool additive) const;
|
2015-09-24 00:59:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ANIM0 : IANIM
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_EXPLICIT_DNA
|
|
|
|
AT_DECL_DNAV
|
2015-09-24 00:59:36 +00:00
|
|
|
ANIM0() : IANIM(0) {}
|
|
|
|
|
|
|
|
struct Header : BigDNA
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_DNA
|
2015-09-27 03:05:43 +00:00
|
|
|
Value<atUint16> unkS;
|
2015-09-24 00:59:36 +00:00
|
|
|
Value<float> duration;
|
|
|
|
Value<atUint32> unk0;
|
|
|
|
Value<float> interval;
|
|
|
|
Value<atUint32> unk1;
|
|
|
|
Value<atUint32> keyCount;
|
|
|
|
Value<atUint32> unk2;
|
|
|
|
Value<atUint32> boneSlotCount;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-09-26 03:12:08 +00:00
|
|
|
struct ANIM1 : IANIM
|
2015-09-24 00:59:36 +00:00
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_EXPLICIT_DNA
|
|
|
|
AT_DECL_DNAV
|
2015-09-26 03:12:08 +00:00
|
|
|
ANIM1() : IANIM(1) {}
|
2015-09-24 00:59:36 +00:00
|
|
|
|
|
|
|
struct Header : BigDNA
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_DNA
|
2015-09-26 03:12:08 +00:00
|
|
|
Value<atUint16> unk1;
|
2015-09-24 00:59:36 +00:00
|
|
|
Value<atUint8> unk2;
|
|
|
|
Value<atUint32> unk3;
|
2015-09-26 03:12:08 +00:00
|
|
|
Value<atUint8> unk4[3];
|
2015-09-24 00:59:36 +00:00
|
|
|
Value<float> translationMult;
|
2016-08-26 22:23:59 +00:00
|
|
|
Value<float> scaleMult;
|
2015-09-26 03:12:08 +00:00
|
|
|
Value<atUint32> unk7;
|
|
|
|
Value<float> unk8;
|
|
|
|
Value<float> unk9;
|
|
|
|
Value<float> duration;
|
|
|
|
Value<atUint16> keyCount;
|
|
|
|
Value<atUint32> blobSize;
|
|
|
|
Value<atUint8> unk10;
|
|
|
|
Value<atUint32> floatsSize;
|
|
|
|
Value<atUint32> flagsSize;
|
|
|
|
Value<atUint32> initBlockSize;
|
|
|
|
Value<atUint32> streamSize;
|
|
|
|
Value<atUint32> unk11;
|
|
|
|
Value<atUint32> boneCount;
|
2015-09-24 00:59:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
std::unique_ptr<IANIM> m_anim;
|
2015-10-18 04:08:45 +00:00
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
void sendANIMToBlender(hecl::blender::PyOutStream& os,
|
2016-09-06 05:52:51 +00:00
|
|
|
const DNAANIM::RigInverter<CINF>& rig,
|
|
|
|
bool additive) const
|
2015-09-24 00:59:36 +00:00
|
|
|
{
|
2016-04-07 03:40:25 +00:00
|
|
|
m_anim->sendANIMToBlender(os, rig, additive);
|
2015-09-24 00:59:36 +00:00
|
|
|
}
|
|
|
|
|
2018-10-28 01:22:55 +00:00
|
|
|
void extractEVNT(const DNAANCS::AnimationResInfo<UniqueID64>& animInfo,
|
|
|
|
const hecl::ProjectPath& outPath, PAKRouter<PAKBridge>& pakRouter, bool force) const {}
|
|
|
|
|
2015-09-24 00:59:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|