#include <maya/MFnPlugin.h>
#include <maya/MDGMessage.h>
#include <maya/MDrawRegistry.h>
#include <maya/MGlobal.h>
#include <maya/MIOStream.h>
#include <maya/MHWShaderSwatchGenerator.h>
#include <maya/MDrawRegistry.h>
#include "GLSLShaderStrings.h"
#include "GLSLShaderCmd.h"
#include "GLSLShader.h"
#include "GLSLShaderOverride.h"
#include "crackFreePrimitiveGenerator.h"
#include "adjacentTrianglesPrimitiveGenerator.h"
{
MFnPlugin plugin(obj,
"Autodesk",
"1.0",
"Any");
UserClassify += GLSLShaderNode::m_drawDbClassification;
GLSLShaderCmd::creator,
GLSLShaderCmd::newSyntax));
{
MString sCmd =
"evalDeferred \"source \\\"GLSLShader_initUI.mel\\\"\"";
}
{
UserClassify =
MString(
"shader/surface/utility/:drawdb/shader/surface/GLSLShader:swatch/"+swatchName );
}
GLSLShaderNode::m_TypeName,
GLSLShaderNode::m_TypeId,
GLSLShaderNode::creator,
GLSLShaderNode::initialize,
&UserClassify);
{
status.
perror(
"registerNode");
return status;
}
GLSLShaderNode::m_drawDbClassification,
GLSLShaderNode::m_RegistrantId,
GLSLShaderOverride::Creator);
{
status.
perror(
"registerShaderOverrideCreator");
return status;
}
status =
MGlobal::executeCommand(
"filePathEditor -registerType \"GLSLShader.shader\" -typeLabel \"GLSLShader\" -temporary");
if (!status) {
MString nodeAttr(
"GLSLShader.shader");
MString errorString = glslShaderStrings::getString( glslShaderStrings::kErrorRegisterNodeType, nodeAttr );
}
return status;
}
{
GLSLShaderNode::m_drawDbClassification,
GLSLShaderNode::m_RegistrantId);
{
status.
perror(
"deregisterShaderOverrideCreator");
return status;
}
status = plugin.deregisterNode(GLSLShaderNode::m_TypeId);
{
status.
perror(
"deregisterNode");
return status;
}
return status;
}