-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
48 lines (39 loc) · 1.11 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <maya/MFnPlugin.h>
#include <maya/MGlobal.h>
#include "CenterPointNode.h"
MStatus initializePlugin(MObject pluginObj)
{
const char* vendor = "Adriano Domeniconi";
const char* version = "1.0.0";
const char* requiredApiVersion = "Any";
MStatus status;
MFnPlugin pluginFn(pluginObj, vendor, version, requiredApiVersion, &status);
if(!status)
{
MGlobal::displayError("Failed to initialize plugin: " + status.errorString());
return(status);
}
status = pluginFn.registerNode(CenterPointNode::GetTypeName(),
CenterPointNode::GetTypeId(),
CenterPointNode::Creator,
CenterPointNode::Initialize,
CenterPointNode::kDependNode);
if (!status)
{
MGlobal::displayError("Failed to register centerPointNode: " + status.errorString());
return(status);
}
return status;
}
MStatus uninitializePlugin(MObject pluginObj)
{
MStatus status;
MFnPlugin pluginFn(pluginObj);
status = pluginFn.deregisterNode(CenterPointNode::GetTypeId());
if (!status)
{
MGlobal::displayError("Failed to de-register centerPointNode: " + status.errorString());
return(status);
}
return status;
}