6#ifndef MATERIALX_LOOK_H
7#define MATERIALX_LOOK_H
18MATERIALX_NAMESPACE_BEGIN
68 const string& material = EMPTY_STRING);
73 return getChildOfType<MaterialAssign>(name);
79 return getChildrenOfType<MaterialAssign>();
89 removeChildOfType<MaterialAssign>(name);
103 return addChild<PropertyAssign>(name);
109 return getChildOfType<PropertyAssign>(name);
115 return getChildrenOfType<PropertyAssign>();
125 removeChildOfType<PropertyAssign>(name);
139 return addChild<PropertySetAssign>(name);
145 return getChildOfType<PropertySetAssign>(name);
151 return getChildrenOfType<PropertySetAssign>();
161 removeChildOfType<PropertySetAssign>(name);
175 return addChild<VariantAssign>(name);
181 return getChildOfType<VariantAssign>(name);
187 return getChildrenOfType<VariantAssign>();
197 removeChildOfType<VariantAssign>(name);
211 return addChild<Visibility>(name);
217 return getChildOfType<Visibility>(name);
223 return getChildrenOfType<Visibility>();
233 removeChildOfType<Visibility>(name);
239 static const string CATEGORY;
248 Element(parent, CATEGORY, name)
278 static const string CATEGORY;
279 static const string LOOKS_ATTRIBUTE;
280 static const string ACTIVE_ATTRIBUTE;
325 setTypedAttribute<bool>(EXCLUSIVE_ATTRIBUTE, value);
331 return getTypedAttribute<bool>(EXCLUSIVE_ATTRIBUTE);
352 return addChild<VariantAssign>(name);
358 return getChildOfType<VariantAssign>(name);
364 return getChildrenOfType<VariantAssign>();
374 removeChildOfType<VariantAssign>(name);
378 static const string CATEGORY;
379 static const string MATERIAL_ATTRIBUTE;
380 static const string EXCLUSIVE_ATTRIBUTE;
472 setTypedAttribute<bool>(VISIBLE_ATTRIBUTE, visible);
478 return getTypedAttribute<bool>(VISIBLE_ATTRIBUTE);
484 static const string CATEGORY;
485 static const string VIEWER_GEOM_ATTRIBUTE;
486 static const string VIEWER_COLLECTION_ATTRIBUTE;
487 static const string VISIBILITY_TYPE_ATTRIBUTE;
488 static const string VISIBLE_ATTRIBUTE;
500MATERIALX_NAMESPACE_END
shared_ptr< Element > ElementPtr
A shared pointer to an Element.
Definition: Element.h:31
shared_ptr< const LookGroup > ConstLookGroupPtr
A shared pointer to a const LookGroup.
Definition: Look.h:34
shared_ptr< MaterialAssign > MaterialAssignPtr
A shared pointer to a MaterialAssign.
Definition: Look.h:37
shared_ptr< LookGroup > LookGroupPtr
A shared pointer to a LookGroup.
Definition: Look.h:32
shared_ptr< const MaterialAssign > ConstMaterialAssignPtr
A shared pointer to a const MaterialAssign.
Definition: Look.h:39
shared_ptr< const Visibility > ConstVisibilityPtr
A shared pointer to a const Visibility.
Definition: Look.h:44
MX_CORE_API vector< MaterialAssignPtr > getGeometryBindings(ConstNodePtr materialNode, const string &geom=UNIVERSAL_GEOM_NAME)
Return a vector of all MaterialAssign elements that bind this material node to the given geometry str...
shared_ptr< const Look > ConstLookPtr
A shared pointer to a const Look.
Definition: Look.h:29
shared_ptr< Visibility > VisibilityPtr
A shared pointer to a Visibility.
Definition: Look.h:42
shared_ptr< Look > LookPtr
A shared pointer to a Look.
Definition: Look.h:27
Material node helper functions.
Import and export declarations for the Core library.
shared_ptr< const Node > ConstNodePtr
A shared pointer to a const Node.
Definition: Node.h:26
shared_ptr< Node > NodePtr
A shared pointer to a Node.
Definition: Node.h:24
Property element subclasses.
shared_ptr< PropertySetAssign > PropertySetAssignPtr
A shared pointer to a PropertySetAssign.
Definition: Property.h:39
shared_ptr< PropertyAssign > PropertyAssignPtr
A shared pointer to a PropertyAssign.
Definition: Property.h:29
Variant element subclasses.
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 geometric elements, which support bindings to geometries and geometric collections...
Definition: Geom.h:144
A look group element within a Document.
Definition: Look.h:245
void setLooks(const string &looks)
Set comma-separated list of looks.
Definition: Look.h:254
const string & getLooks() const
Get comma-separated list of looks.
Definition: Look.h:260
void setActiveLook(const string &look)
Set the active look.
Definition: Look.h:266
const string & getActiveLook() const
Return the active look, if any.
Definition: Look.h:272
A look element within a Document.
Definition: Look.h:49
VariantAssignPtr getVariantAssign(const string &name) const
Return the VariantAssign, if any, with the given name.
Definition: Look.h:179
void removeMaterialAssign(const string &name)
Remove the MaterialAssign, if any, with the given name.
Definition: Look.h:87
vector< MaterialAssignPtr > getMaterialAssigns() const
Return a vector of all MaterialAssign elements in the look.
Definition: Look.h:77
PropertySetAssignPtr getPropertySetAssign(const string &name) const
Return the PropertySetAssign, if any, with the given name.
Definition: Look.h:143
VisibilityPtr getVisibility(const string &name) const
Return the Visibility, if any, with the given name.
Definition: Look.h:215
vector< PropertyAssignPtr > getPropertyAssigns() const
Return a vector of all PropertyAssign elements in the look.
Definition: Look.h:113
MaterialAssignPtr addMaterialAssign(const string &name=EMPTY_STRING, const string &material=EMPTY_STRING)
Add a MaterialAssign to the look.
vector< PropertySetAssignPtr > getPropertySetAssigns() const
Return a vector of all PropertySetAssign elements in the look.
Definition: Look.h:149
vector< VisibilityPtr > getActiveVisibilities() const
Return a vector of all Visibility elements that belong to this look, taking look inheritance into acc...
vector< PropertySetAssignPtr > getActivePropertySetAssigns() const
Return a vector of all PropertySetAssign elements that belong to this look, taking look inheritance i...
void removeVisibility(const string &name)
Remove the Visibility, if any, with the given name.
Definition: Look.h:231
PropertyAssignPtr addPropertyAssign(const string &name=EMPTY_STRING)
Add a PropertyAssign to the look.
Definition: Look.h:101
void removePropertyAssign(const string &name)
Remove the PropertyAssign, if any, with the given name.
Definition: Look.h:123
PropertyAssignPtr getPropertyAssign(const string &name) const
Return the PropertyAssign, if any, with the given name.
Definition: Look.h:107
vector< MaterialAssignPtr > getActiveMaterialAssigns() const
Return a vector of all MaterialAssign elements that belong to this look, taking look inheritance into...
void removeVariantAssign(const string &name)
Remove the VariantAssign, if any, with the given name.
Definition: Look.h:195
MaterialAssignPtr getMaterialAssign(const string &name) const
Return the MaterialAssign, if any, with the given name.
Definition: Look.h:71
void removePropertySetAssign(const string &name)
Remove the PropertySetAssign, if any, with the given name.
Definition: Look.h:159
VisibilityPtr addVisibility(const string &name=EMPTY_STRING)
Add a Visibility to the look.
Definition: Look.h:209
vector< VisibilityPtr > getVisibilities() const
Return a vector of all Visibility elements in the look.
Definition: Look.h:221
VariantAssignPtr addVariantAssign(const string &name=EMPTY_STRING)
Add a VariantAssign to the look.
Definition: Look.h:173
PropertySetAssignPtr addPropertySetAssign(const string &name=EMPTY_STRING)
Add a PropertySetAssign to the look.
Definition: Look.h:137
vector< VariantAssignPtr > getActiveVariantAssigns() const
Return a vector of all VariantAssign elements that belong to this look, taking look inheritance into ...
vector< PropertyAssignPtr > getActivePropertyAssigns() const
Return a vector of all PropertyAssign elements that belong to this look, taking look inheritance into...
vector< VariantAssignPtr > getVariantAssigns() const
Return a vector of all VariantAssign elements in the look.
Definition: Look.h:185
A material assignment element within a Look.
Definition: Look.h:286
const string & getMaterial() const
Return the material string for the MaterialAssign.
Definition: Look.h:310
VariantAssignPtr getVariantAssign(const string &name) const
Return the VariantAssign, if any, with the given name.
Definition: Look.h:356
NodePtr getReferencedMaterial() const
Return the material node, if any, referenced by the MaterialAssign.
void setExclusive(bool value)
Set the exclusive boolean for the MaterialAssign.
Definition: Look.h:323
void setMaterial(const string &material)
Set the material string for the MaterialAssign.
Definition: Look.h:298
bool getExclusive() const
Return the exclusive boolean for the MaterialAssign.
Definition: Look.h:329
void removeVariantAssign(const string &name)
Remove the VariantAssign, if any, with the given name.
Definition: Look.h:372
vector< OutputPtr > getMaterialOutputs() const
Return the outputs on any referenced material.
VariantAssignPtr addVariantAssign(const string &name=EMPTY_STRING)
Add a VariantAssign to the look.
Definition: Look.h:350
bool hasMaterial() const
Return true if the given MaterialAssign has a material string.
Definition: Look.h:304
vector< VariantAssignPtr > getActiveVariantAssigns() const
Return a vector of all VariantAssign elements that belong to this look, taking look inheritance into ...
vector< VariantAssignPtr > getVariantAssigns() const
Return a vector of all VariantAssign elements in the look.
Definition: Look.h:362
A visibility element within a Look.
Definition: Look.h:392
const string & getVisibilityType() const
Return the visibility type string of the element.
Definition: Look.h:460
void setVisible(bool visible)
Set the visible boolean of the element.
Definition: Look.h:470
bool hasVisibilityType() const
Return true if the given element has a visibility type string.
Definition: Look.h:454
const string & getViewerCollection() const
Return the viewer collection string of the element.
Definition: Look.h:438
bool getVisible() const
Return the visible boolean of the element.
Definition: Look.h:476
void setVisibilityType(const string &type)
Set the visibility type string of the element.
Definition: Look.h:448
bool hasViewerGeom() const
Return true if the given element has a viewer geom string.
Definition: Look.h:410
void setViewerGeom(const string &geom)
Set the viewer geom string of the element.
Definition: Look.h:404
bool hasViewerCollection() const
Return true if the given element has a viewer collection string.
Definition: Look.h:432
const string & getViewerGeom() const
Return the viewer geom string of the element.
Definition: Look.h:416
void setViewerCollection(const string &collection)
Set the viewer geom string of the element.
Definition: Look.h:426