forked from sjirka/SeamsEasy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStitchEasyCtxCmd.cpp
50 lines (33 loc) · 923 Bytes
/
StitchEasyCtxCmd.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
#include "StitchEasyCtxCmd.h"
#include "StitchEasyNode.h"
#include "SNode.h"
StitchEasyCtxCmd::StitchEasyCtxCmd()
{
}
StitchEasyCtxCmd::~StitchEasyCtxCmd()
{
}
void *StitchEasyCtxCmd::creator() {
return new StitchEasyCtxCmd;
}
MPxContext* StitchEasyCtxCmd::makeObj() {
return m_context = new StitchEasyCtx;
}
MStatus StitchEasyCtxCmd::appendSyntax() {
MStatus status;
MSyntax newSyntax = syntax();
newSyntax.addFlag("-nd", "-node", MSyntax::kString);
return MS::kSuccess;
}
MStatus StitchEasyCtxCmd::doEditFlags() {
MStatus status;
MArgParser argData = parser();
if (argData.isFlagSet("-nd")) {
MString nodeName = argData.flagArgumentString("-nd", 0);
MObject pluginNode;
status = SNode::getPluginNode(nodeName, StitchEasyNode::id, pluginNode);
CHECK_MSTATUS_AND_RETURN_IT(status);
m_context->setNode(nodeName);
}
return MS::kSuccess;
}