#include "blindDataMesh.h"
#include "blindDataShader.h"
#include "blindDataShaderOverride.h"
#include "blindDataMeshVertexBufferGenerator.h"
#include <maya/MFnPlugin.h>
#include <maya/MDrawRegistry.h>
namespace
{
const char* gShaderOverrideDrawClassification = "drawdb/shader/surface/blindDataShaderOverride";
const char* gShaderOverrideRegistrantId = "blindDataShaderOverride";
}
{
MFnPlugin plugin( obj, PLUGIN_COMPANY,
"5.0",
"Any");
MString userClassify(
"shader/surface/utility:" );
userClassify += gShaderOverrideDrawClassification;
status = plugin.registerNode( "blindDataShader",
blindDataShader::id,
blindDataShader::creator,
blindDataShader::initialize,
&userClassify);
if (!status) {
status.
perror(
"registerNode");
return status;
}
gShaderOverrideDrawClassification,
gShaderOverrideRegistrantId,
blindDataShaderOverride::Creator);
if (!status) {
status.
perror(
"registerShaderOverrideCreator failed !");
return status;
}
status = plugin.registerNode( "blindDataMesh",
blindDataMesh::id,
blindDataMesh::creator,
blindDataMesh::initialize );
if (!status) {
status.
perror(
"registerNode");
return status;
}
status = MDrawRegistry::registerVertexBufferGenerator("blindDataColorStream", blindDataMeshVertexBufferGenerator::Creator);
if (!status) {
status.
perror(
"registerVertexBufferGenerator failed !");
return status;
}
return status;
}
{
status = plugin.deregisterNode( blindDataMesh::id );
if (!status) {
status.
perror(
"deregisterNode");
return status;
}
status = plugin.deregisterNode( blindDataShader::id );
if (!status) {
status.
perror(
"deregisterNode");
return status;
}
if (!status) {
status.
perror(
"deregisterShaderOverrideCreator failed !");
return status;
}
status = MDrawRegistry::deregisterVertexBufferGenerator("blindDataColorStream");
if (!status) {
status.
perror(
"deregisterVertexBufferGenerator failed !");
return status;
}
return status;
}