forked from sideeffects/HoudiniEngineForMaya
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SubCommand.C
60 lines (46 loc) · 815 Bytes
/
SubCommand.C
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
#include "SubCommand.h"
#include <maya/MFnDependencyNode.h>
#include "AssetNode.h"
SubCommand::SubCommand()
{
}
SubCommand::~SubCommand()
{
}
MStatus
SubCommand::doIt()
{
return MStatus::kSuccess;
}
MStatus
SubCommand::redoIt()
{
return MStatus::kSuccess;
}
MStatus
SubCommand::undoIt()
{
return MStatus::kSuccess;
}
bool
SubCommand::isUndoable() const
{
return false;
}
SubCommandAsset::SubCommandAsset(const MObject &assetNodeObj) :
myAssetNodeObj(assetNodeObj)
{
}
AssetNode*
SubCommandAsset::getAssetNode() const
{
MFnDependencyNode assetNodeFn(myAssetNodeObj);
AssetNode* assetNode = dynamic_cast<AssetNode*>(assetNodeFn.userNode());
return assetNode;
}
Asset*
SubCommandAsset::getAsset() const
{
Asset* asset = getAssetNode()->getAsset();
return asset;
}