2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2015-08-13 07:29:00 +00:00
|
|
|
|
2018-06-29 20:21:36 +00:00
|
|
|
#include "DataSpec/DNACommon/DNACommon.hpp"
|
|
|
|
#include "DataSpec/DNACommon/RigInverter.hpp"
|
2015-08-13 07:29:00 +00:00
|
|
|
|
2017-12-29 08:08:12 +00:00
|
|
|
namespace DataSpec::DNAMP2
|
2015-08-13 07:29:00 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
struct CINF : BigDNA
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-13 07:29:00 +00:00
|
|
|
Value<atUint32> boneCount;
|
|
|
|
struct Bone : BigDNA
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-13 07:29:00 +00:00
|
|
|
Value<atUint32> id;
|
|
|
|
Value<atUint32> parentId;
|
|
|
|
Value<atVec3f> origin;
|
2016-08-26 22:23:59 +00:00
|
|
|
Value<atVec4f> q1;
|
|
|
|
Value<atVec4f> q2;
|
2015-08-13 07:29:00 +00:00
|
|
|
Value<atUint32> linkedCount;
|
2018-02-25 08:23:27 +00:00
|
|
|
Vector<atUint32, AT_DNA_COUNT(linkedCount)> linked;
|
2015-08-13 07:29:00 +00:00
|
|
|
};
|
2018-02-25 08:23:27 +00:00
|
|
|
Vector<Bone, AT_DNA_COUNT(boneCount)> bones;
|
2015-08-13 07:29:00 +00:00
|
|
|
|
|
|
|
Value<atUint32> boneIdCount;
|
2018-02-25 08:23:27 +00:00
|
|
|
Vector<atUint32, AT_DNA_COUNT(boneIdCount)> boneIds;
|
2015-08-13 07:29:00 +00:00
|
|
|
|
|
|
|
Value<atUint32> nameCount;
|
|
|
|
struct Name : BigDNA
|
|
|
|
{
|
2018-02-22 07:24:51 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-13 07:29:00 +00:00
|
|
|
String<-1> name;
|
|
|
|
Value<atUint32> boneId;
|
|
|
|
};
|
2018-02-25 08:23:27 +00:00
|
|
|
Vector<Name, AT_DNA_COUNT(nameCount)> names;
|
2016-04-07 03:40:25 +00:00
|
|
|
|
2016-04-26 00:47:48 +00:00
|
|
|
atUint32 getInternalBoneIdxFromId(atUint32 id) const;
|
|
|
|
atUint32 getBoneIdxFromId(atUint32 id) const;
|
|
|
|
const std::string* getBoneNameFromId(atUint32 id) const;
|
2017-12-29 08:08:12 +00:00
|
|
|
void sendVertexGroupsToBlender(hecl::blender::PyOutStream& os) const;
|
|
|
|
void sendCINFToBlender(hecl::blender::PyOutStream& os, const UniqueID32& cinfId) const;
|
2016-04-26 00:47:48 +00:00
|
|
|
static std::string GetCINFArmatureName(const UniqueID32& cinfId);
|
2015-08-13 07:29:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|