#include <maya/MFnPlugin.h>
#include <maya/MGlobal.h>
#include <slopeShaderBehavior.h>
#include <slopeShaderNode.h>
MStatus initializePlugin( MObject obj )
{
MStatus status;
MFnPlugin plugin( obj, PLUGIN_COMPANY, "4.5", "Any");
const MString UserClassify( "utility/color" );
MString command( "if( `window -exists createRenderNodeWindow` ) {refreshCreateRenderNodeWindow(\"" );
command += UserClassify;
command += "\");}\n";
plugin.registerNode( "slopeShader", slopeShaderNode::id,
slopeShaderNode::creator, slopeShaderNode::initialize,
slopeShaderNode::kDependNode, &UserClassify );
plugin.registerDragAndDropBehavior( "slopeShaderBehavior",
slopeShaderBehavior::creator);
MGlobal::executeCommand(command);
return status;
}
MStatus uninitializePlugin( MObject obj )
{
MStatus status;
MFnPlugin plugin( obj );
const MString UserClassify( "utility/color" );
MString command( "if( `window -exists createRenderNodeWindow` ) {refreshCreateRenderNodeWindow(\"" );
command += UserClassify;
command += "\");}\n";
plugin.deregisterNode( slopeShaderNode::id );
plugin.deregisterDragAndDropBehavior( "slopeShaderBehavior" );
MGlobal::executeCommand(command);
return status;
}