#include "AlembicNode.h"
#include "AbcImport.h"
#include "AlembicImportFileTranslator.h"
#include "AbcImportStrings.h"
#include <maya/MGlobal.h>
#include <maya/MFnPlugin.h>
#include <maya/MObject.h>
#include <maya/MGlobal.h>
const MTypeId AlembicNode::mMayaNodeId(0x00082697);
{
const char * pluginVersion = "1.0";
MFnPlugin plugin(obj,
"Alembic", pluginVersion,
"Any");
plugin.registerUIStrings( AbcImportStrings::registerMStringResources, "AbcImportInitStrings" ) ;
status = plugin.registerCommand("AbcImport",
AbcImport::creator,
AbcImport::createSyntax);
if (!status)
{
status.
perror(
"registerCommand");
}
status = plugin.registerNode("AlembicNode",
AlembicNode::mMayaNodeId,
&AlembicNode::creator,
&AlembicNode::initialize);
if (!status)
{
status.
perror(
"registerNode");
}
status = plugin.registerFileTranslator("Alembic",
NULL,
AlembicImportFileTranslator::creator,
NULL,
NULL,
true);
if (!status)
{
status.
perror(
"registerFileTranslator");
}
info += pluginVersion;
info += " using ";
info += Alembic::AbcCoreAbstract::GetLibraryVersion().c_str();
return status;
}
{
status = plugin.deregisterFileTranslator("Alembic");
if (!status)
{
status.
perror(
"deregisterFileTranslator");
}
status = plugin.deregisterNode(AlembicNode::mMayaNodeId);
if (!status)
{
status.
perror(
"deregisterNode");
}
status = plugin.deregisterCommand("AbcImport");
if (!status)
{
status.
perror(
"deregisterCommand");
}
return status;
}