What's New in Director 8.5 > The 3D Cast Member > Models |  |

Models

The models in a cast member are the actual visible objects seen in the 3D cast member. Models move according to the motions you assign to them in the 3D modeling software you use. Their movement results from repositioning and reorienting their geometries in 3D space.

The following commands and properties can be used to perform basic model operations:

Command | Function | Returns
--- | --- | ---
`model.count` | Returns the number of model objects included in the cast member. | Integer.
`model(``name``)` | Returns the model named `name`. | Returns the model object named `name` if it exists. Returns `void` if the object does not exist.
`model[``index``]` | Returns the model at the designated position in the index. The index number can change if models lower in the list are deleted. | Returns the model object at that index number if it exists. Returns `void` if the object does not exist at that index number.
`newModel(``name, modelResource``)` | Creates a new model named `name` and adds it to the world. Fails if a model by that name already exists. The `modelResource` argument is optional and be set at a later time. If supplied, this second argument must be an existing model resource object. | Returns a new model with a unique name. If the name isn't unique, returns a Lingo error.
`deleteModel(``name``)` | Deletes the model named `name`. Lingo references to this model persist but can do nothing. Children of the model aren't deleted but are "reparented" to the world group. | `TRUE (1)` if the model named name exists. `FALSE (0)` if the model named name doesn't exist.
`deleteModel(``index``)` | Deletes the model with the given index number. Lingo references to this model persist but can do nothing. | `TRUE (1)` if the model with this index number exists. `FALSE (0)` if the model with this index number doesn't exist.