6#ifndef MATERIALX_LOOK_H
7#define MATERIALX_LOOK_H
69 const string& material = EMPTY_STRING);
74 return getChildOfType<MaterialAssign>(name);
80 return getChildrenOfType<MaterialAssign>();
85 vector<MaterialAssignPtr> getActiveMaterialAssigns()
const;
90 removeChildOfType<MaterialAssign>(name);
104 return addChild<PropertyAssign>(name);
110 return getChildOfType<PropertyAssign>(name);
116 return getChildrenOfType<PropertyAssign>();
121 vector<PropertyAssignPtr> getActivePropertyAssigns()
const;
126 removeChildOfType<PropertyAssign>(name);
140 return addChild<PropertySetAssign>(name);
146 return getChildOfType<PropertySetAssign>(name);
152 return getChildrenOfType<PropertySetAssign>();
157 vector<PropertySetAssignPtr> getActivePropertySetAssigns()
const;
162 removeChildOfType<PropertySetAssign>(name);
176 return addChild<VariantAssign>(name);
182 return getChildOfType<VariantAssign>(name);
188 return getChildrenOfType<VariantAssign>();
193 vector<VariantAssignPtr> getActiveVariantAssigns()
const;
198 removeChildOfType<VariantAssign>(name);
212 return addChild<Visibility>(name);
218 return getChildOfType<Visibility>(name);
224 return getChildrenOfType<Visibility>();
229 vector<VisibilityPtr> getActiveVisibilities()
const;
234 removeChildOfType<Visibility>(name);
240 static const string CATEGORY;
249 Element(parent, CATEGORY, name)
257 setAttribute(LOOKS_ATTRIBUTE, looks);
263 return getAttribute(LOOKS_ATTRIBUTE);
269 setAttribute(ACTIVE_ATTRIBUTE, look);
275 return getAttribute(ACTIVE_ATTRIBUTE);
279 static const string CATEGORY;
280 static const string LOOKS_ATTRIBUTE;
281 static const string ACTIVE_ATTRIBUTE;
301 setAttribute(MATERIAL_ATTRIBUTE, material);
307 return hasAttribute(MATERIAL_ATTRIBUTE);
313 return getAttribute(MATERIAL_ATTRIBUTE);
323 setTypedAttribute<bool>(EXCLUSIVE_ATTRIBUTE, value);
329 return getTypedAttribute<bool>(EXCLUSIVE_ATTRIBUTE);
337 NodePtr getReferencedMaterial()
const;
350 return addChild<VariantAssign>(name);
356 return getChildOfType<VariantAssign>(name);
362 return getChildrenOfType<VariantAssign>();
367 vector<VariantAssignPtr> getActiveVariantAssigns()
const;
372 removeChildOfType<VariantAssign>(name);
375 static const string CATEGORY;
376 static const string MATERIAL_ATTRIBUTE;
377 static const string EXCLUSIVE_ATTRIBUTE;
403 setAttribute(VIEWER_GEOM_ATTRIBUTE, geom);
409 return hasAttribute(VIEWER_GEOM_ATTRIBUTE);
415 return getAttribute(VIEWER_GEOM_ATTRIBUTE);
425 setAttribute(VIEWER_COLLECTION_ATTRIBUTE, collection);
431 return hasAttribute(VIEWER_COLLECTION_ATTRIBUTE);
437 return getAttribute(VIEWER_COLLECTION_ATTRIBUTE);
447 setAttribute(VISIBILITY_TYPE_ATTRIBUTE, type);
453 return hasAttribute(VISIBILITY_TYPE_ATTRIBUTE);
459 return getAttribute(VISIBILITY_TYPE_ATTRIBUTE);
469 setTypedAttribute<bool>(VISIBLE_ATTRIBUTE, visible);
475 return getTypedAttribute<bool>(VISIBLE_ATTRIBUTE);
481 static const string CATEGORY;
482 static const string VIEWER_GEOM_ATTRIBUTE;
483 static const string VIEWER_COLLECTION_ATTRIBUTE;
484 static const string VISIBILITY_TYPE_ATTRIBUTE;
485 static const string VISIBLE_ATTRIBUTE;
495MX_CORE_API vector<MaterialAssignPtr> getGeometryBindings(
const NodePtr& materialNode,
const string& geom);
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:35
shared_ptr< MaterialAssign > MaterialAssignPtr
A shared pointer to a MaterialAssign.
Definition: Look.h:38
shared_ptr< LookGroup > LookGroupPtr
A shared pointer to a LookGroup.
Definition: Look.h:33
shared_ptr< const MaterialAssign > ConstMaterialAssignPtr
A shared pointer to a const MaterialAssign.
Definition: Look.h:40
shared_ptr< const Visibility > ConstVisibilityPtr
A shared pointer to a const Visibility.
Definition: Look.h:45
shared_ptr< const Look > ConstLookPtr
A shared pointer to a const Look.
Definition: Look.h:30
shared_ptr< Visibility > VisibilityPtr
A shared pointer to a Visibility.
Definition: Look.h:43
shared_ptr< Look > LookPtr
A shared pointer to a Look.
Definition: Look.h:28
Material node helper functions.
Import and export declarations for the Core library.
shared_ptr< Node > NodePtr
A shared pointer to a Node.
Definition: Node.h:25
Property element subclasses.
shared_ptr< PropertySetAssign > PropertySetAssignPtr
A shared pointer to a PropertySetAssign.
Definition: Property.h:40
shared_ptr< PropertyAssign > PropertyAssignPtr
A shared pointer to a PropertyAssign.
Definition: Property.h:30
Variant element subclasses.
shared_ptr< VariantAssign > VariantAssignPtr
A shared pointer to a VariantAssign.
Definition: Variant.h:34
The base class for MaterialX elements.
Definition: Element.h:75
The base class for geometric elements, which support bindings to geometries and geometric collections...
Definition: Geom.h:154
A look group element within a Document.
Definition: Look.h:246
void setLooks(const string &looks)
Set comma-separated list of looks.
Definition: Look.h:255
const string & getLooks() const
Get comma-separated list of looks.
Definition: Look.h:261
void setActiveLook(const string &look)
Set the active look.
Definition: Look.h:267
const string & getActiveLook() const
Return the active look, if any.
Definition: Look.h:273
A look element within a Document.
Definition: Look.h:50
VariantAssignPtr getVariantAssign(const string &name) const
Return the VariantAssign, if any, with the given name.
Definition: Look.h:180
void removeMaterialAssign(const string &name)
Remove the MaterialAssign, if any, with the given name.
Definition: Look.h:88
vector< MaterialAssignPtr > getMaterialAssigns() const
Return a vector of all MaterialAssign elements in the look.
Definition: Look.h:78
PropertySetAssignPtr getPropertySetAssign(const string &name) const
Return the PropertySetAssign, if any, with the given name.
Definition: Look.h:144
VisibilityPtr getVisibility(const string &name) const
Return the Visibility, if any, with the given name.
Definition: Look.h:216
vector< PropertyAssignPtr > getPropertyAssigns() const
Return a vector of all PropertyAssign elements in the look.
Definition: Look.h:114
vector< PropertySetAssignPtr > getPropertySetAssigns() const
Return a vector of all PropertySetAssign elements in the look.
Definition: Look.h:150
void removeVisibility(const string &name)
Remove the Visibility, if any, with the given name.
Definition: Look.h:232
PropertyAssignPtr addPropertyAssign(const string &name=EMPTY_STRING)
Add a PropertyAssign to the look.
Definition: Look.h:102
void removePropertyAssign(const string &name)
Remove the PropertyAssign, if any, with the given name.
Definition: Look.h:124
PropertyAssignPtr getPropertyAssign(const string &name) const
Return the PropertyAssign, if any, with the given name.
Definition: Look.h:108
void removeVariantAssign(const string &name)
Remove the VariantAssign, if any, with the given name.
Definition: Look.h:196
MaterialAssignPtr getMaterialAssign(const string &name) const
Return the MaterialAssign, if any, with the given name.
Definition: Look.h:72
void removePropertySetAssign(const string &name)
Remove the PropertySetAssign, if any, with the given name.
Definition: Look.h:160
VisibilityPtr addVisibility(const string &name=EMPTY_STRING)
Add a Visibility to the look.
Definition: Look.h:210
vector< VisibilityPtr > getVisibilities() const
Return a vector of all Visibility elements in the look.
Definition: Look.h:222
VariantAssignPtr addVariantAssign(const string &name=EMPTY_STRING)
Add a VariantAssign to the look.
Definition: Look.h:174
PropertySetAssignPtr addPropertySetAssign(const string &name=EMPTY_STRING)
Add a PropertySetAssign to the look.
Definition: Look.h:138
vector< VariantAssignPtr > getVariantAssigns() const
Return a vector of all VariantAssign elements in the look.
Definition: Look.h:186
A material assignment element within a Look.
Definition: Look.h:287
const string & getMaterial() const
Return the material string for the MaterialAssign.
Definition: Look.h:311
VariantAssignPtr getVariantAssign(const string &name) const
Return the VariantAssign, if any, with the given name.
Definition: Look.h:354
void setExclusive(bool value)
Set the exclusive boolean for the MaterialAssign.
Definition: Look.h:321
void setMaterial(const string &material)
Set the material string for the MaterialAssign.
Definition: Look.h:299
bool getExclusive() const
Return the exclusive boolean for the MaterialAssign.
Definition: Look.h:327
void removeVariantAssign(const string &name)
Remove the VariantAssign, if any, with the given name.
Definition: Look.h:370
VariantAssignPtr addVariantAssign(const string &name=EMPTY_STRING)
Add a VariantAssign to the look.
Definition: Look.h:348
bool hasMaterial() const
Return true if the given MaterialAssign has a material string.
Definition: Look.h:305
vector< VariantAssignPtr > getVariantAssigns() const
Return a vector of all VariantAssign elements in the look.
Definition: Look.h:360
A visibility element within a Look.
Definition: Look.h:389
const string & getVisibilityType() const
Return the visibility type string of the element.
Definition: Look.h:457
void setVisible(bool visible)
Set the visible boolean of the element.
Definition: Look.h:467
bool hasVisibilityType() const
Return true if the given element has a visibility type string.
Definition: Look.h:451
const string & getViewerCollection() const
Return the viewer collection string of the element.
Definition: Look.h:435
bool getVisible() const
Return the visible boolean of the element.
Definition: Look.h:473
void setVisibilityType(const string &type)
Set the visibility type string of the element.
Definition: Look.h:445
bool hasViewerGeom() const
Return true if the given element has a viewer geom string.
Definition: Look.h:407
void setViewerGeom(const string &geom)
Set the viewer geom string of the element.
Definition: Look.h:401
bool hasViewerCollection() const
Return true if the given element has a viewer collection string.
Definition: Look.h:429
const string & getViewerGeom() const
Return the viewer geom string of the element.
Definition: Look.h:413
void setViewerCollection(const string &collection)
Set the viewer geom string of the element.
Definition: Look.h:423