Softimage SDK Programmer's Guide > Working with the SDK > Storing Custom (User) Data >

# What is User Data?

User Data is any data that you want to store on either a component or an object in a Autodesk Softimage scene. This data may be stored as Binary Large OBjects (BLOBs) or as data values (integers, boolean values, strings, etc.).

Tip

According to www.msdn.microsoft.com, a BLOB is a type of data column that contains binary data such as graphics, sound, or compiled code.

These data formats belong to four main categories:

- Non-Binary Object-level User Data—see Custom Properties:

  You can store non-binary user data (such as string values, numeric values, boolean values, etc.) on objects using custom properties which can be accessed directly through scripting commands or the object model.

  These maps are attached directly to objects (see What Elements Can Store Binary User Data?). The data can be viewed and updated using property pages.

- Binary Object-level User Data—see Attaching Binary User Data to Objects:

  UserDataBlobs or UserDataBlobs contain binary user data (BLOBs) and can be accessed directly through scripting commands or the object model.

  These BLOBs are attached directly to objects (see What Elements Can Store Binary User Data?) and are designed to carry rendering data from Softimage to mental ray.

  Note

  Using the UserDataBlob object with C++ is easier and more efficient than using it with scripting. The C++ API version is the preferred implementation.

- Binary Component-level User Data—see Accessing Binary User Data on Components:

  UserDataMaps or UserDataMaps are containers for binary user data (BLOBs) and can be accessed directly through scripting commands or the object model.

  These maps are attached to clusters of subcomponents (see What Elements Can Store Binary User Data?). The data cannot be viewed or updated through the user interface.

- Templated Binary Component-level User Data—see Accessing Templated User Data on Components:

  This type of user data container allows the plug-in developer to determine what types of data can be attached before the user begins associating data with a given object. In other words, this is a mechanism for creating a template or mask that declares what kind of user data can be associated with a given cluster.

  Plug-in developers can create Templated User Data by creating a custom parameter page in the user interface and then attaching that parameter set to the User Data Map through scripting commands or object model.

## What Elements Can Store Binary User Data?

Autodesk Softimage supports user data on any scene object, material, shader or action or on any subcomponent element, such as points, vertices, knots, segments, edges, curves, facets, surfaces, etc.

Note

SI|3D and Autodesk Softimage both support user data, and you can import the SI|3D user data into Softimage. For more information, see Importing User Data from SOFTIMAGE|3D.

User data is stored on objects using UserDataBlobs or UserDataBlobs and on components using UserDataMaps or UserDataMaps.

## Typical Uses for Binary User Data

User data can be used as interchange information between the scene data as it exists in SI|3D or Autodesk Softimage and proprietary software, game platform or plug-ins.

Scenario | How it could be accomplished with User Data
--- | ---
Adding flags to polygons | Games use various different render functions in realtime that need to be applied to specific polygons in a mesh. For example, reflective rendering on the windows of a vehicle, or adding an emissive color effect to the engine exhaust area. Also, selecting polygons and tagging them as non-collideable could be used to create hanging cobwebs inside a hallway without having the player collide with the polygon.
Tagging vertices in a mesh for numbering purposes | Sometimes an effect needs to travel across a mesh in a certain way. This could be done by flagging the vertices in order of the way the effect should proceed across the mesh. For example, a lightning shock could be configured to jump between flagged points on a mesh.
Incorporating variable weighting into specified areas of a mesh | It would be useful to assign variable weighting to points based on the rotation of the bones. This would facilitate animating the elbow and knee regions of a character so that the polygons won't intersect poorly. With these annotations on points, the engine could read the points from a set of variables and perform these actions in the engine.
Pushing shader information through to mental ray | You can write store shader information for an object which can then be retrieved by the the renderer (for example, mental ray).
Plug-in maintains its own state in a scene | State information can be stored as a simple data value (using the CustomProperty object) or as a binary value (using the UserDataBlob) inside the scene so that every time a custom command or other plugin is executed it can continue from where it left off.