blob: 225328d83db9222bca742a84770a3f17c5ef6893 (
plain) (
blame)
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
|
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962
#include <maya/MArgList.h>
#include <maya/MGlobal.h>
#include <maya/MPxCommand.h>
#include <maya/MString.h>
#include "shavePadCmd.h"
const MString shavePadCmd::commandName("shavePadCmd");
shavePadCmd::shavePadCmd() {}
shavePadCmd::~shavePadCmd() {}
void* shavePadCmd::createCmd()
{
return new shavePadCmd();
}
MStatus shavePadCmd::doIt(const MArgList& argList)
{
MStatus st;
if (argList.length() < 2) return MS::kInvalidParameter;
MString cmd = argList.asString(0);
unsigned int numArgsRequired = (unsigned int)argList.asInt(1);
unsigned int i;
for (i = 2; i < argList.length(); i++)
cmd = cmd + " \"" + argList.asString(i) + "\"";
for (; i < numArgsRequired + 2; i++)
cmd = cmd + " \"\"";
st = MGlobal::executeCommand(cmd, false, true);
return st;
}
|