-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMetaDataManagerNode.cpp
59 lines (43 loc) · 1.45 KB
/
MetaDataManagerNode.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
51
52
53
54
55
56
57
58
59
/*************************************************************
* Summary: Defines a MetaDataManager node that is used *
* for tracking MetaRoot nodes in the scene and *
* updating their metadata networks. *
* Author: Logan Kelly *
* Date: 9/18/12 *
*************************************************************/
#include "MetaDataManagerNode.h"
#include <maya/MPlug.h>
#include <maya/MDataBlock.h>
#include <maya/MDataHandle.h>
#include <maya/MGlobal.h>
MTypeId MetaDataManagerNode::id( 0x00335 );
MObject MetaDataManagerNode::metaRoots;
MetaDataManagerNode::MetaDataManagerNode() {}
MetaDataManagerNode::~MetaDataManagerNode() {}
MStatus MetaDataManagerNode::compute( const MPlug& plug, MDataBlock& data )
{
MStatus returnStatus;
// Check which output attribute we have been asked to compute. If this
// node doesn't know how to compute it, we must return
// MS::kUnknownParameter.
//
if( plug == metaRoots )
{
} else {
return MS::kUnknownParameter;
}
return MS::kSuccess;
}
void* MetaDataManagerNode::creator()
{
return new MetaDataManagerNode();
}
MStatus MetaDataManagerNode::initialize()
{
MFnMessageAttribute mAttr;
MFnTypedAttribute tAttr;
MFnNumericAttribute nAttr;
metaRoots = tAttr.create("metaRoots", "metaRoots", MFnData::kString);
addAttribute( metaRoots );
return MS::kSuccess;
}