6#ifndef MATERIALX_LOOK_H
7#define MATERIALX_LOOK_H
18MATERIALX_NAMESPACE_BEGIN
48class MX_CORE_API Look :
public Element
52 Element(parent, CATEGORY, name)
68 const string& material = EMPTY_STRING);
239 static const string CATEGORY;
244class MX_CORE_API LookGroup :
public Element
247 LookGroup(
ElementPtr parent,
const string& name) :
248 Element(parent, CATEGORY, name)
251 virtual ~LookGroup() { }
278 static const string CATEGORY;
279 static const string LOOKS_ATTRIBUTE;
280 static const string ACTIVE_ATTRIBUTE;
285class MX_CORE_API MaterialAssign :
public GeomElement
288 MaterialAssign(
ElementPtr parent,
const string& name) :
289 GeomElement(parent, CATEGORY, name)
292 virtual ~MaterialAssign() { }
378 static const string CATEGORY;
379 static const string MATERIAL_ATTRIBUTE;
380 static const string EXCLUSIVE_ATTRIBUTE;
391class MX_CORE_API Visibility :
public GeomElement
394 Visibility(
ElementPtr parent,
const string& name) :
395 GeomElement(parent, CATEGORY, name)
398 virtual ~Visibility() { }
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
const string & getAttribute(const string &attrib) const
Return the value string of the given attribute.
Definition Element.h:489
shared_ptr< T > addChild(const string &name=EMPTY_STRING)
Add a child element of the given subclass and name.
Definition Element.h:1399
void setAttribute(const string &attrib, const string &value)
Set the value string of the given attribute.
void setTypedAttribute(const string &attrib, const T &data)
Set the value of an implicitly typed attribute.
Definition Element.h:504
T getTypedAttribute(const string &attrib) const
Return the value of an implicitly typed attribute.
Definition Element.h:512
shared_ptr< T > getChildOfType(const string &name) const
Return the child element, if any, with the given name and subclass.
bool hasAttribute(const string &attrib) const
Return true if the given attribute is present.
Definition Element.h:482
void removeChildOfType(const string &name)
Remove the child element, if any, with the given name and subclass.
Definition Element.h:468
vector< shared_ptr< T > > getChildrenOfType(const string &category=EMPTY_STRING) const
Return a vector of all child elements that are instances of the given subclass, optionally filtered b...
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