2015-08-13 07:29:00 +00:00
|
|
|
#ifndef _DNAMP2_CINF_HPP_
|
|
|
|
#define _DNAMP2_CINF_HPP_
|
|
|
|
|
|
|
|
#include "BlenderConnection.hpp"
|
|
|
|
#include "../DNACommon/DNACommon.hpp"
|
2016-04-09 07:10:09 +00:00
|
|
|
#include "../DNACommon/RigInverter.hpp"
|
2015-08-13 07:29:00 +00:00
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
namespace DataSpec
|
2015-08-13 07:29:00 +00:00
|
|
|
{
|
|
|
|
namespace DNAMP2
|
|
|
|
{
|
|
|
|
|
|
|
|
struct CINF : BigDNA
|
|
|
|
{
|
|
|
|
DECL_DNA
|
|
|
|
Value<atUint32> boneCount;
|
|
|
|
struct Bone : BigDNA
|
|
|
|
{
|
|
|
|
DECL_DNA
|
|
|
|
Value<atUint32> id;
|
|
|
|
Value<atUint32> parentId;
|
|
|
|
Value<atVec3f> origin;
|
2015-08-15 04:12:15 +00:00
|
|
|
Value<float> skinMetrics[8];
|
2015-08-13 07:29:00 +00:00
|
|
|
Value<atUint32> linkedCount;
|
|
|
|
Vector<atUint32, DNA_COUNT(linkedCount)> linked;
|
|
|
|
};
|
|
|
|
Vector<Bone, DNA_COUNT(boneCount)> bones;
|
|
|
|
|
|
|
|
Value<atUint32> boneIdCount;
|
|
|
|
Vector<atUint32, DNA_COUNT(boneIdCount)> boneIds;
|
|
|
|
|
|
|
|
Value<atUint32> nameCount;
|
|
|
|
struct Name : BigDNA
|
|
|
|
{
|
|
|
|
DECL_DNA
|
|
|
|
String<-1> name;
|
|
|
|
Value<atUint32> boneId;
|
|
|
|
};
|
|
|
|
Vector<Name, 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;
|
|
|
|
void sendVertexGroupsToBlender(hecl::BlenderConnection::PyOutStream& os) const;
|
|
|
|
void sendCINFToBlender(hecl::BlenderConnection::PyOutStream& os, const UniqueID32& cinfId) const;
|
|
|
|
static std::string GetCINFArmatureName(const UniqueID32& cinfId);
|
2015-08-13 07:29:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // _DNAMP2_CINF_HPP_
|