forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProperty.cpp
More file actions
33 lines (26 loc) · 729 Bytes
/
Property.cpp
File metadata and controls
33 lines (26 loc) · 729 Bytes
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
//
// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
// All rights reserved. See LICENSE.txt for license.
//
#include <MaterialXCore/Property.h>
#include <MaterialXCore/Document.h>
namespace MaterialX
{
const string PropertyAssign::GEOM_ATTRIBUTE = "geom";
const string PropertyAssign::COLLECTION_ATTRIBUTE = "collection";
void PropertyAssign::setCollection(ConstCollectionPtr collection)
{
if (collection)
{
setCollectionString(collection->getName());
}
else
{
removeAttribute(COLLECTION_ATTRIBUTE);
}
}
CollectionPtr PropertyAssign::getCollection() const
{
return resolveRootNameReference<Collection>(getCollectionString());
}
} // namespace MaterialX