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 files (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 also can catch events regarding to the attributes, for example when the user changes the value.