-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpluginMain.cpp
More file actions
executable file
·41 lines (32 loc) · 1.19 KB
/
Copy pathpluginMain.cpp
File metadata and controls
executable file
·41 lines (32 loc) · 1.19 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
#include <maya/MFnPlugin.h>
#include "brushContext.h"
#include "brushContextCommand.h"
#include "brushToolCommand.h"
MStatus initializePlugin( MObject obj )
{
MStatus status;
MFnPlugin plugin( obj, "jc.crystalCG/RedpawFX", "1.0.1", "Any");
status = plugin.registerContextCommand("curveBrushContext",
brushContextCommand::creator,
"curveBrushToolCmd",
brushToolCommand::creator,
brushToolCommand::newSyntax
);
if (!status) {
MGlobal::displayError("Error registering curveBrushContextCommand");
return status;
}
MGlobal::executeCommand("curveBrushRunTimeCommands");
return status;
}
MStatus uninitializePlugin( MObject obj )
{
MStatus status;
MFnPlugin plugin( obj );
status = plugin.deregisterContextCommand("curveBrushContext","curveBrushToolCmd");
if (!status) {
MGlobal::displayError("Error deregistering curvebrushContextCommand");
return status;
}
return status;
}