User Guide

Shaders 319
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
The following cast member methods and properties can be used to perform basic
shader operations:
model(name1).
clone
Deep(name2)
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.
Method Function Returns
shader.count
Returns the number of shader objects
included in the cast member.
Integer.
shader(name)
Returns the shader named name. Returns the shader object
named
name if it exists. Returns
void if the object does not
exist.
shader[index]
Returns the shader at the designated
position in the index. The index number can
change if shaders are added or deleted.
Returns the shader object at
that index number if it exists.
Returns
void if the object does
not exist at that index number.
newShader
(name,type)
Creates a new shader and adds it to the
shader object list. The
type can be
#standard, #painter, #engraver, or
#newsprint.
Returns a new shader object
with a unique name. If the
name isn’t unique, returns a
script error.
Method Function Returns