
ADOBE DIRECTOR 11.0
User Guide
314
Shaders
A shader defines the basic appearance of a model’s surface. You apply textures to shaders. The standard shader is
photorealistic. The following list describes some of the other available shaders:
•
#painter
, which looks like a painted surface
•
#engraver
, which looks like an engraved surface
•
#newsprint
, which looks like a newspaper photograph
Use the following cast member methods and properties to perform basic shader operations:
Method
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 index position.
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 can 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 an error.
deleteModel
(
name
)
Deletes the model named
name
. Script references to
this model persist but can do nothing. Children of the
model aren’t deleted but are re-parented 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.
Script 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.
model(
name
1)
.clone
(
na
me
2)
Creates a copy of the model named
name1
and
assigns it the name
name2
. The new model uses the
same model resource and shader as the original
model; changes to the model resource and shader of
the original model appear in the new model as well.
Returns the model named
name2
.
model(
name
1)
.
clone
Deep(
name
2)
Creates a copy of the model named
name1
and
assigns it the name
name2
. The new model uses a
copy of the original model’s model resource and
shader. Changes to the original model’s model
resource and shader have no effect on the new model.
Returns the model named
name2
.
cloneModelFromCast
Member
(
name1
,
name2
,
member(
name3
)
)
Copies the model named
name2
(from the member
named
name3
) into the current member. The new
copy is named
name1
. This is similar to the
cloneDeep()
method, but it copies a model from
one cast member to another.
Returns the model named
name1
.
Содержание 65036570 - Director - PC
Страница 1: ...i ADOBE DIRECTOR 11 USER GUIDE...