3D Lingo Dictionary > T-Z > userData

 

userData

Syntax

member(whichCastmember).model(whichModel).userData
member(whichCastmember).light(whichLight).userData
member(whichCastmember).camera(whichCamera).userData
member(whichCastmember).group(whichCamera).userData

Description

3D property; returns the userData property list of a model, group, camera, or light. The default value of this property for an object that was created outside of Director is a list of all the properties that were assigned to the model's userData property in the 3D modeling tool. The default value of this property for objects created inside of Director is an empty property list [:], unless the object was created using any of the clone commands. If a cloning command was used to create the object then the new object's userData property defaults to a value equal to that of the original source object.

To modify the elements of this list you must use the addProp and deleteProp commands documented in the main Lingo Dictionary.

Examples

This statement displays the userData property of the model named New Body.

put member("Car").model("New Body").userData
-- [#driver: "Bob", #damage: 34]

This statement adds the property #health with the value 100 to the userData property list for the model named Player.

member("scene").model("Player").userData.addProp(#health,100)