3D Lingo Dictionary > O-S > shaderList |  |

shaderList

Syntax

    member(whichCastmember).model(whichModel).shaderList
    member(whichCastmember).model(whichModel).shaderList[index]

Description

3D model property; a linear list of `shader` applied to the model. The number of entries in this list equals the number of meshes in the model resource used by the model. Each mesh can be shaded by only one shader.

Set the shader at the specified `index` position in the `shaderlist` with this syntax: `member(``whichCastmember``).model(``whichModel``).shaderList[``index``] = shaderReference`

Set all `index` positions in the `shaderList` to the same shader with this syntax (note the absence of an index for the `shaderList`): `member(``whichCastmember``).model(``whichModel``).shaderList = shaderReference`

Set a property of a shader in the `shaderlist` with this syntax: `member(``whichCastmember``).model(``whichModel``).shaderList[``index``].``whichProperty``=` `propValue`

Set a property of all of the shaders of a model to the same value with this syntax (note the absence of an index for the shaderList): `member(``whichCastmember``).model(``whichModel``).shaderList.``whichProperty``=` `propValue`

Example

This statement sets the second shader in the `shaderList` of the model named Bumper to the shader named Chrome.

    member("Car").model("Bumper").shaderList[2] = member("Car").shader("Chrome")

This statement sets the all of the shaders in the `shaderList` of the model named Bumper to the shader named Chrome.

    member("Car").model("Bumper").shaderList = member("Car").shader("Chrome")

See also

`shader`