-
Notifications
You must be signed in to change notification settings - Fork 5
/
pluginMain.cpp
55 lines (46 loc) · 1.14 KB
/
pluginMain.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
49
50
51
52
53
54
// File: pluginMain.cpp
//
// Author: Maya Plug-in Wizard 2.0
//
#include "slideMeshNode.h"
#include <maya/MFnPlugin.h>
MStatus initializePlugin( MObject obj )
//
// Description:
// this method is called when the plug-in is loaded into Maya. It
// registers all of the services that this plug-in provides with
// Maya.
//
// Arguments:
// obj - a handle to the plug-in object (use MFnPlugin to access it)
//
{
MStatus status;
MFnPlugin plugin( obj, "", "8.5", "Any");
status = plugin.registerNode( "slideMesh", slideMesh::id, slideMesh::creator,
slideMesh::initialize,MPxNode::kDeformerNode );
if (!status) {
status.perror("registerNode");
return status;
}
return status;
}
MStatus uninitializePlugin( MObject obj)
//
// Description:
// this method is called when the plug-in is unloaded from Maya. It
// deregisters all of the services that it was providing.
//
// Arguments:
// obj - a handle to the plug-in object (use MFnPlugin to access it)
//
{
MStatus status;
MFnPlugin plugin( obj );
status = plugin.deregisterNode( slideMesh::id );
if (!status) {
status.perror("deregisterNode");
return status;
}
return status;
}