forked from kattkieru/grim_IK
-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugin_main.cpp
69 lines (52 loc) · 1.74 KB
/
plugin_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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <maya/MFnPlugin.h>
#include "common.h"
#include "grim_vik.h"
// ----------------------------------------------------------------------
MStatus Grim_VIK_initializePlugin( MFnPlugin *plugin );
MStatus Grim_VIK_uninitializePlugin( MFnPlugin *plugin );
// ----------------------------------------------------------------------
PLUGIN_EXPORT MStatus initializePlugin( MObject obj )
{
MStatus status;
MFnPlugin plugin(obj, PLG_COMPANY, PLG_VERSION, "Any");
// MGlobal::displayInfo("+ Grimoire IK: Registering...");
status = Grim_VIK_initializePlugin( std::addressof(plugin) );
if (!status) {
const char *msg = "Grim_VIK registerNode";
MGlobal::displayError(msg);
status.perror(msg);
return status;
}
// MGlobal::displayInfo("+ Grimoire IK: Registration complete.");
return status;
}
// ----------------------------------------------------------------------
PLUGIN_EXPORT MStatus uninitializePlugin( MObject obj)
{
MStatus status;
MFnPlugin plugin(obj);
status = Grim_VIK_uninitializePlugin( std::addressof(plugin) );
if (!status) {
status.perror("Grim_VIK deregisterNode");
return status;
}
return status;
}
// ----------------------------------------------------------------------
MStatus Grim_VIK_initializePlugin( MFnPlugin *plugin )
{
//!FIXME: Move this to the main plugin init
MStatus status;
// MGlobal::displayInfo("Registering sm_rope...");
status = plugin->registerNode( "grim_vik", Grim_VIK::id, Grim_VIK::creator,
Grim_VIK::initialize );
Grim_VIK::aeTemplate();
return status;
}
// ----------------------------------------------------------------------
MStatus Grim_VIK_uninitializePlugin( MFnPlugin *plugin )
{
MStatus status;
status = plugin->deregisterNode( Grim_VIK::id );
return status;
}