mirror of https://github.com/AxioDL/metaforce.git
work on ANCS cooking
This commit is contained in:
parent
e20837eabd
commit
07392938d8
|
@ -11,6 +11,8 @@ namespace Retro
|
|||
namespace DNAANCS
|
||||
{
|
||||
|
||||
using Actor = HECL::BlenderConnection::DataStream::Actor;
|
||||
|
||||
template <typename IDTYPE>
|
||||
struct CharacterResInfo
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 8d513577cb199a8e567119fe45356b75ab3700ed
|
||||
Subproject commit 94fedaa3065cb8a75b204eae13cc6f0213aa426a
|
Loading…
Reference in New Issue