UserDataItem
 
 
 

UserDataItem

Object Hierarchy

Introduced

v3.0

Description

The UserDataItem object represents a single instance of user data that has been attached to a Softimage component. For example, each polygon on a Cluster with a UserDataMap will have its own instance of this UserDataItem object.

This object is provided for convenience but it is also possible to manipulate the user data using the methods UserDataMap.ItemValue, UserDataMap.ItemSize and UserDataMap.IsEmpty provided directly on the UserDataMap.

Properties

IsEmpty operator Size operator Value operator  
       

Examples

VBScript Example

'
' Example demonstrating the properties and methods on the
' UserDataItem object
'
dim oRoot, oTorus, oCluster, oUserDataMap, oUserData
set oRoot = Application.ActiveProject.ActiveScene.Root
set oTorus = oRoot.AddGeometry("Torus","NurbsSurface")
set oCluster = oTorus.ActivePrimitive.Geometry.AddCluster( siBoundaryCluster )
set oUserDataMap = oCluster.AddProperty("UserDataMap",, "NameOfProperty")
set oUserData = oUserDataMap.Item( 0 )
Application.LogMessage oUserData.IsEmpty & "/" & oUserData.Size & "/" & oUserData.Value
' We can save strings in the user data
oUserData.Value = "Some content"
Application.LogMessage oUserData.IsEmpty & "/" & oUserData.Size & "/" & oUserData.Value
' Output of this script is:
'INFO : "True/0/"
'INFO : "False/24/Some content"

See Also

UserDataMap