#ifndef _AlembicExport_MayaUtility_h_
#define _AlembicExport_MayaUtility_h_
#include "Foundation.h"
#include <Alembic/Abc/OArrayProperty.h>
#include <Alembic/Abc/OScalarProperty.h>
namespace util
{
struct mObjectCmp
{
{
}
};
typedef std::map <MObject, MSelectionList, mObjectCmp> GetMembersMap;
struct cmpDag
{
{
return (name1.compare(name2) < 0);
}
};
typedef std::set< MDagPath, cmpDag > ShapeSet;
{
{
}
return status;
}
{
{
}
return status;
}
inline double inverseScale(double scale)
{
const double kScaleEpsilon = 1.0e-12;
if (scale < kScaleEpsilon && scale >= 0.0)
return 1.0 / kScaleEpsilon;
else if (scale > -kScaleEpsilon && scale < 0.0)
return 1.0 / -kScaleEpsilon;
else
return 1.0 / scale;
}
double spf();
bool isAncestorDescendentRelationship(
const MDagPath & path1,
int getSampledType(
const MPlug& iPlug);
int getVisibilityType(
const MPlug & iPlug);
unsigned int & oXAxis, unsigned int & oYAxis, unsigned int & oZAxis);
bool isAnimated(
MObject &
object,
bool checkParent =
false);
bool isIntermediate(
const MObject &
object);
bool isRenderable(
const MObject &
object);
MString stripNamespaces(
const MString & iNodeName,
unsigned int iDepth);
}
struct PlugAndObjScalar
{
Alembic::Abc::OScalarProperty prop;
};
struct PlugAndObjArray
{
Alembic::Abc::OArrayProperty prop;
};
struct JobArgs
{
JobArgs()
{
excludeInvisible = false;
filterEulerRotations = false;
noNormals = false;
stripNamespace = 0;
useSelectionList = false;
worldSpace = false;
writeVisibility = false;
writeUVs = false;
writeColorSets = false;
writeFaceSets = false;
verbose = false;
}
bool excludeInvisible;
bool filterEulerRotations;
bool noNormals;
unsigned int stripNamespace;
bool useSelectionList;
bool worldSpace;
bool writeVisibility;
bool writeUVs;
bool writeColorSets;
bool writeFaceSets;
bool verbose;
std::string melPerFrameCallback;
std::string melPostCallback;
std::string pythonPerFrameCallback;
std::string pythonPostCallback;
std::vector< std::string > prefixFilters;
std::set< std::string > attribs;
std::vector< std::string > userPrefixFilters;
std::set< std::string > userAttribs;
util::ShapeSet dagPaths;
};
#endif // _AlembicExport_MayaUtility_h_