Custom User Properties
 
 
 

In addition to custom attributes another method of attaching data to a node is using custom user properties. This is data that a user can add and edit using the object properties dialog.

This data can be ASCII text, an integer value, a float value, or a boolean value. These values are stored and retrieved using a 'key' string. This is a string of any length -- the only limitation is that the key string must not contains spaces, tabs or the equal sign (=) character.

To get and set specific data values developers may use the following methods of INode:

Getter Functions Setter Functions
INode::GetUserPropString() INode::SetUserPropString()
INode::GetUserPropInt() INode::SetUserPropInt()
INode::GetUserPropFloat() INode::SetUserPropFloat()
INode::GetUserPropBool() INode::SetUserPropBool()

An end user may enter this data as well (in the 3ds Max user interface it is referred to as a "User Defined Property"). Using the Object Properties dialog a user may enter text in the following format:

PropertyName1=PropertyValue 1
PropertyName2=PropertyValue 2
...

The property name corresponds to the key string. The property name must appear at the start of the line (although it can be preceded by spaces or tabs) and there can be only one property per line.

A developer may access the entire user-defined property text buffer if they wish to parse it themselves. The methods to do this are INode::GetUserPropBuffer() and INode::SetUserPropBuffer().