-
Notifications
You must be signed in to change notification settings - Fork 59
/
SyncOutputGeometryPart.h
64 lines (49 loc) · 2.11 KB
/
SyncOutputGeometryPart.h
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
61
62
63
64
#ifndef __SyncOutputGeometryPart_h__
#define __SyncOutputGeometryPart_h__
#include <maya/MDagModifier.h>
#include <maya/MObjectArray.h>
#include <maya/MPlug.h>
#include "SubCommand.h"
class SyncOutputGeometryPart : public SubCommand
{
public:
SyncOutputGeometryPart(const MPlug &outputPlug,
const MObject &objectTransform);
virtual ~SyncOutputGeometryPart();
virtual MStatus doIt();
MStatus doItPost(SyncOutputGeometryPart *const *syncParts);
virtual MStatus undoIt();
virtual MStatus redoIt();
virtual bool isUndoable() const;
const MObject &partTransform() const { return myPartTransform; }
bool isInstanced() { return myIsInstanced; }
void setIsInstanced(bool isInstanced) { myIsInstanced = isInstanced; }
protected:
MStatus createOutputPart(const MObject &objectTransform,
const MString &partName);
MStatus createOutputMesh(const MString &partName, const MPlug &meshPlug);
MStatus createOutputParticle(const MString &partName,
const MPlug &particlePlug);
MStatus createOutputCurves(MPlug curvesPlug,
const MString &partName,
bool isBezier);
MStatus createOutputInstancer(const MString &partName,
const MPlug &instancerPlug);
MStatus createOutputInstancerPost(const MPlug &instancerPlug,
SyncOutputGeometryPart *const *syncParts);
MStatus createOutputExtraAttributes(const MObject &dstNode,
MPlug *mayaSGAttributePlug = NULL);
MStatus createOutputGroups(const MObject &dstNode,
std::vector<bool> *hasMaterials = NULL);
protected:
// This is the output plug from the asset node that represents an object
// eg. (assetNode.objects[1])
const MPlug myOutputPlug;
// the transform of the HAPI Asset
const MObject myObjectTransform;
MDagModifier myDagModifier;
MObject myPartTransform;
MObjectArray myPartShapes;
bool myIsInstanced;
};
#endif