6#ifndef MATERIALX_VARIANT_H
7#define MATERIALX_VARIANT_H
16MATERIALX_NAMESPACE_BEGIN
49 static const string CATEGORY;
73 return addChild<Variant>(name);
79 return getChildOfType<Variant>(name);
85 return getChildrenOfType<Variant>();
91 removeChildOfType<Variant>(name);
97 static const string CATEGORY;
108 Element(parent, CATEGORY, name)
159 static const string CATEGORY;
160 static const string VARIANT_SET_ATTRIBUTE;
161 static const string VARIANT_ATTRIBUTE;
164MATERIALX_NAMESPACE_END
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
Definition: Element.h:31
Interface element subclasses.
Import and export declarations for the Core library.
shared_ptr< VariantSet > VariantSetPtr
A shared pointer to a VariantSet.
Definition: Variant.h:28
shared_ptr< const VariantAssign > ConstVariantAssignPtr
A shared pointer to a const VariantAssign.
Definition: Variant.h:35
shared_ptr< const Variant > ConstVariantPtr
A shared pointer to a const Variant.
Definition: Variant.h:25
shared_ptr< Variant > VariantPtr
A shared pointer to a Variant.
Definition: Variant.h:23
shared_ptr< const VariantSet > ConstVariantSetPtr
A shared pointer to a const VariantSet.
Definition: Variant.h:30
shared_ptr< VariantAssign > VariantAssignPtr
A shared pointer to a VariantAssign.
Definition: Variant.h:33
The base class for MaterialX elements.
Definition: Element.h:80
const string & getAttribute(const string &attrib) const
Return the value string of the given attribute.
Definition: Element.h:504
void setAttribute(const string &attrib, const string &value)
Set the value string of the given attribute.
bool hasAttribute(const string &attrib) const
Return true if the given attribute is present.
Definition: Element.h:497
The base class for interface elements such as Node, NodeDef, and NodeGraph.
Definition: Interface.h:312
A variant assignment element within a Look.
Definition: Variant.h:105
bool hasVariantString() const
Return true if the given element has a variant string.
Definition: Variant.h:145
void setVariantString(const string &variant)
Set the element's variant string.
Definition: Variant.h:139
void setVariantSetString(const string &variantSet)
Set the element's variant set string.
Definition: Variant.h:117
const string & getVariantString() const
Return the element's variant string.
Definition: Variant.h:151
const string & getVariantSetString() const
Return the element's variant set string.
Definition: Variant.h:129
bool hasVariantSetString() const
Return true if the given element has a variant set string.
Definition: Variant.h:123
A variant element within a VariantSet.
Definition: Variant.h:40
A variant set element within a Document.
Definition: Variant.h:55
VariantPtr getVariant(const string &name) const
Return the Variant, if any, with the given name.
Definition: Variant.h:77
vector< VariantPtr > getVariants() const
Return a vector of all Variant elements in the look.
Definition: Variant.h:83
void removeVariant(const string &name)
Remove the Variant, if any, with the given name.
Definition: Variant.h:89
VariantPtr addVariant(const string &name=EMPTY_STRING)
Add a Variant to the variant set.
Definition: Variant.h:71