Autodesk Mudbox 2013 SDK Documentation > Mudbox Scenes >

# Attributes

An attribute (Attribute) is used to associate a data value (e.g. float, integer, string, etc.) with a Node, which can be displayed in the Mudbox user interace and modified by the user (if Attribute::Const() returns false). Attributes associated with a plug-in can be saved and loaded with a scene by calling the Attribute::Serialize() method for each attribute, from within the plug-in's override of the Node::Serialize() function. For more information see the topic Serializing Plug-in Data.

Attributes have several parameters, which are mostly for use in the GUI, for example Attribute::Name() and Attribute::Category. Some attributes have special parameters depending on their type, for example a float attribute has upper and lower limits.

The aevent attribute (a typedef of EventGate), is a dummy attribute used to send and receive notifications (events) when attributes are changed.

Attributes can be connected so that if the value of one attribute is changed, the connected attribute will change automatically. This can be a way of creating subject-observer relations between objects.

The attributes and their parameter can be loaded and stored in an XML file (called a template file) using the functions Node::LoadTemplate() and Node::SaveTemplate(). To display the attributes editor, called the property window use the methods Node::CreatePropertiesWindow().

Attribute Classes

Attributes are data elements that can be edited by a user. Attributes can be linked together. When the value of an attribute is changed, all target attributes value will be changed also. The owner node can also respond to events triggered by its attributes - for example, when the user changes an attribute's value.

- AttributeInstance - This is a generic attribute which can be used instead of the standard built in types.
- Attribute - This is an abstract base structure for all attributes. Do not use it directly, use AttributeInstance instead.
- Attribute::AttributeType - An enumeration that represents the different kinds of attributes
- AttributeThisPointer - This class represents a special pointer in the Node class, it always points to the owner. Used internally.
- AttributeWatch - A fake attribute used to watch an attribute in your class which is not a member. It is better to create a copy of the attribute in your class with the same type and link it to the target. If you do not know the exact type of the other attribute you can use the AttributeWatch class.