-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathRoadkillMain.cpp
More file actions
executable file
·59 lines (36 loc) · 1.2 KB
/
RoadkillMain.cpp
File metadata and controls
executable file
·59 lines (36 loc) · 1.2 KB
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
#include "RoadkillCmd.h"
#include <maya/MFnPlugin.h>
#include <maya/MIOStream.h>
#include <maya/MGlobal.h>
#include <time.h>
#ifdef WIN32
#define EXTERN_DECL __declspec( dllexport )
#else
#define EXTERN_DECL extern
#endif
char gErrorMessage[512] = {0};
EXTERN_DECL MStatus initializePlugin( MObject obj );
EXTERN_DECL MStatus uninitializePlugin( MObject obj );
/****************************************
* Initialise the plug-in *
****************************************/
MStatus initializePlugin(MObject obj)
{
MStatus status;
MFnPlugin plugin( obj, "(c) 2009 - 2018 Andy Swann", "Version 1.045 R+D", "Any");
status = plugin.registerCommand("RoadkillPro", RoadkillCmd::creator, RoadkillCmd::newSyntax);
CHECK_MSTATUS_AND_RETURN_IT(status);
MGlobal::executeCommand("RoadkillProMenu", false, false);
return MS::kSuccess;
}
/****************************************
* Uninitialise the plug-in *
****************************************/
MStatus uninitializePlugin(MObject obj)
{
MStatus status;
MFnPlugin plugin( obj );
status = plugin.deregisterCommand("RoadkillPro");
CHECK_MSTATUS_AND_RETURN_IT(status);
return MS::kSuccess;
}