work on ANCS cooking

This commit is contained in:
Jack Andersen 2015-10-22 14:45:26 -10:00
parent e20837eabd
commit 07392938d8
9 changed files with 23 additions and 9 deletions

View File

@ -11,6 +11,8 @@ namespace Retro
namespace DNAANCS
{
using Actor = HECL::BlenderConnection::DataStream::Actor;
template <typename IDTYPE>
struct CharacterResInfo
{

View File

@ -413,6 +413,13 @@ struct ANCS : BigYAML
return true;
}
static bool Cook(const HECL::ProjectPath& outPath,
const HECL::ProjectPath& inPath,
const DNAANCS::Actor& actor)
{
return true;
}
};
}

View File

@ -49,7 +49,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<4 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveRotate, c, rotKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveRotate, c, rotKeys.size());
for (const DNAANIM::Value& val : rotKeys)
ao.write(*frameit++, val.v4.vec[c]);
}
@ -60,7 +60,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<3 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveTranslate, c, transKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveTranslate, c, transKeys.size());
for (const DNAANIM::Value& val : transKeys)
ao.write(*frameit++, val.v3.vec[c]);
}

View File

@ -91,6 +91,7 @@ struct CMDL
}
writer.writeUint32Big(*vertCountIt++);
}
writer.writeUint32Big(skinMesh.pos.size());
writer.writeUint32Big(skinMesh.boneNames.size());
for (const std::string& boneName : skinMesh.boneNames)
writer.writeString(boneName);

View File

@ -60,7 +60,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<4 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveRotate, c, rotKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveRotate, c, rotKeys.size());
for (const DNAANIM::Value& val : rotKeys)
ao.write(*frameit++, val.v4.vec[c]);
}
@ -72,7 +72,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<3 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveTranslate, c, transKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveTranslate, c, transKeys.size());
for (const DNAANIM::Value& val : transKeys)
ao.write(*frameit++, val.v3.vec[c]);
}
@ -84,7 +84,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<3 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveScale, c, scaleKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveScale, c, scaleKeys.size());
for (const DNAANIM::Value& val : scaleKeys)
ao.write(*frameit++, val.v3.vec[c]);
}

View File

@ -77,7 +77,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<4 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveRotate, c, rotKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveRotate, c, rotKeys.size());
for (const DNAANIM::Value& val : rotKeys)
ao.write(*frameit++, val.v4.vec[c]);
}
@ -89,7 +89,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<3 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveTranslate, c, transKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveTranslate, c, transKeys.size());
for (const DNAANIM::Value& val : transKeys)
ao.write(*frameit++, val.v3.vec[c]);
}
@ -101,7 +101,7 @@ void ANIM::IANIM::sendANIMToBlender(HECL::BlenderConnection::PyOutStream& os, co
for (int c=0 ; c<3 ; ++c)
{
auto frameit = frames.begin();
ao.changeCurve(ANIMOutStream::CurveScale, c, scaleKeys.size());
ao.changeCurve(ANIMOutStream::CurveType::CurveScale, c, scaleKeys.size());
for (const DNAANIM::Value& val : scaleKeys)
ao.write(*frameit++, val.v3.vec[c]);
}

View File

@ -46,6 +46,7 @@ struct SpecBase : HECL::Database::IDataSpec
/* Cook handlers */
using BlendStream = HECL::BlenderConnection::DataStream;
using Mesh = BlendStream::Mesh;
using Actor = BlendStream::Actor;
virtual void cookMesh(const HECL::ProjectPath& out, const HECL::ProjectPath& in, BlendStream& ds, bool fast, FCookProgress progress) const=0;
virtual void cookActor(const HECL::ProjectPath& out, const HECL::ProjectPath& in, BlendStream& ds, bool fast, FCookProgress progress) const=0;

View File

@ -8,6 +8,7 @@
#include "DNAMP1/MLVL.hpp"
#include "DNAMP1/STRG.hpp"
#include "DNAMP1/CMDL.hpp"
#include "DNAMP1/ANCS.hpp"
namespace Retro
{
@ -294,6 +295,8 @@ struct SpecMP1 : SpecBase
void cookActor(const HECL::ProjectPath& out, const HECL::ProjectPath& in,
BlendStream& ds, bool fast, FCookProgress progress) const
{
Actor actor = ds.compileActor();
DNAMP1::ANCS::Cook(out, in, actor);
}
void cookArea(const HECL::ProjectPath& out, const HECL::ProjectPath& in,

2
hecl

@ -1 +1 @@
Subproject commit 8d513577cb199a8e567119fe45356b75ab3700ed
Subproject commit 94fedaa3065cb8a75b204eae13cc6f0213aa426a