User Guide

336 Chapter 16: Working with Models and Model Resources
Model resources
Model resources are 3D geometries defined in 3D modeling software or created in Director MX
2004 by scripting in Lingo or JavaScript syntax. A model is an object that makes use of a model
resources geometry and occupies a particular position and orientation within the 3D world.
Model resources are viewable only when in use by a model. Several models may use the
same model resource.
Common model resource properties
The following properties are shared by all model resources:
The
bone.count and getBoneID() properties are only available for model resources that have a
type of
#fromFile. They are not available for primitives created with Lingo.
File-defined model resource properties
Model resources defined by a W3D file imported into Director or loaded via script have a
type
value of
#fromfile. File-defined resources are automatically assigned level of detail (LOD)
modifier settings that allow models using those geometries to adjust their level of detail as needed,
depending on the models distance from the camera. For more information, see “Level of detail
(LOD) modifier properties” on page 366.
Property Name Access Description Range or Default
name
Get Unique string naming model resource. If imported, the name
of the model.
If created by scripting,
the assigned name in
the constructor
method.
type
Get Type of geometry. #plane
#box
#sphere
#mesh
#cylinder
#particle
#fromfile
bone.count
Get Total number of bones in bones
hierarchy.
Nonnegative integer.
model
Resource.
getBoneId
("name")
Get Returns a unique ID for the bone named
name in this model’s bone hierarchy.
Returns
FALSE (0) if no bone by that
name can be found.
None.