#ifndef _AbcExport_AbcWriteJob_h_
#define _AbcExport_AbcWriteJob_h_
#include "Foundation.h"
#include "MayaTransformWriter.h"
#include "MayaTransformCollectionWriter.h"
#include "MayaUtility.h"
struct AbcWriteJobStatistics
{
AbcWriteJobStatistics()
{
mTransStaticNum = 0;
mTransAnimNum = 0;
mTransColNum = 0;
}
unsigned int mTransStaticNum;
unsigned int mTransAnimNum;
unsigned int mTransColNum;
};
class AbcWriteJob
{
public:
AbcWriteJob(const char * iFileName,
std::set<double> & iTransFrames,
Alembic::AbcCoreAbstract::TimeSamplingPtr iTransTime,
const JobArgs & iArgs);
~AbcWriteJob();
bool eval(double iFrame);
private:
void perFrameCallback(double iFrame);
void postCallback(double iFrame);
void setup(double iFrame, MayaTransformWriterPtr iParent,
util::GetMembersMap& gmMap);
std::vector< MayaTransformWriterPtr > mTransList;
std::vector< AttributesWriterPtr > mTransAttrList;
std::vector< MayaTransformCollectionWriterPtr > mTransColList;
std::vector< AttributesWriterPtr > mTransColAttrList;
Alembic::Abc::OArchive mRoot;
std::string mFileName;
std::set<double> mTransFrames;
Alembic::AbcCoreAbstract::TimeSamplingPtr mTransTime;
Alembic::Util::uint32_t mTransTimeIndex;
Alembic::Util::uint32_t mTransSamples;
double mFirstFrame;
double mLastFrame;
Alembic::Abc::OBox3dProperty mBoxProp;
unsigned int mBoxIndex;
AbcWriteJobStatistics mStats;
JobArgs mArgs;
};
typedef Alembic::Util::shared_ptr < AbcWriteJob > AbcWriteJobPtr;
#endif // _AbcExport_AbcWriteJob_h_