Object Hierarchy | Related C++ Class: UserDataMap | Supported Parameter List: UserDataMap
Inheritance
SIObject
ProjectItem
Property
UserDataMap
Introduced
3.0
Description
The UserDataMap is a Property that can be attached to any cluster. It permits the storage of variable length binary user data on the individual components of a geometry. The data is stored as part of the scene file and can be accessed via plug-ins using the Object Model.
Softimage plug-ins (both persistent and immediate effects) can use this property to save and retrieve data that is associated with individual vertices, polygons, edges, or other components of an object. Example data possibilities include custom game structures, raw simulation data, matrices, comments and images.
There are two ways that a UserDataMap can be used - for binary data or for templated data. With a Binary UserDataMap, the structure of the user data is left completely up to the plug-in. This is well suited to C++ plug-ins. However, as the examples below demonstrate, it is possible to access this data through scripting by using strings. The second type of UserDataMap uses a CustomProperty to strictly define the structure of the user data (see UserDataMap.Template). Templated user data can be inspected in the UI (see InspectUserData) in addition to scripting and C++ access.
UserDataMaps are created with CreateUserDataMap or SceneItem.AddProperty.
UserDataMap differs from the CustomProperty and UserDataBlob objects in that it stores separate data for each individual component of a cluster. For example a cluster with ten polygons will have ten different UserDataItem objects. It is possible to enumerate the UserDataItem objects in a UserDataMap using UserDataMap.Item, or the VBScript "for each" loop construct, or the JScript Enumerator object. It is also possible to access the contents of a UserDataMap directly with UserDataMap.ItemValue.
The UserDataMap is similar to a ClusterProperty, which also stores per-component data, but the UserDataMap allows variable length data, whereas the ClusterProperty objects always store a fixed number of Doubles at each component.
The User Data Map provides similar functionality to that available from the SAAPHIRE SAA_subelement* UserData functions. For example, the Name of the property corresponds to the Tag argument to functions like SAA_subelementSetUserData.
It is possible to save a preset of a user data map and to reapply the user data on a different object. However, for the best results, the number of components in both clusters should be the same.
Methods
|
|
|
|
Properties
|
|
See Also
|
|
|
|
Examples
• See UserDataMap.1.vbs
• See UserDataMap.2.js
• See UserDataMap.3.vbs
• See UserDataMap.4.vbs
Autodesk Softimage 2011