Line 17
calls the
nm = member("Shapes").newMesh("pyramid",6 , 5, 0, 3)
nm.vertexList = [ vector(0,0,0), vector(40,0,0), \
vector(40,0,40), vector(0,0,40), vector(20,50,20) ]
nm.colorList = [ rgb(255,0,0), rgb(0,255,0), rgb(0,0,255) ]
nm.face[1].vertices = [ 4,1,2 ]
nm.face[2].vertices = [ 4,2,3 ]
nm.face[3].vertices = [ 5,2,1 ]
nm.face[4].vertices = [ 5,3,2 ]
nm.face[5].vertices = [ 5,4,3 ]
nm.face[6].vertices = [ 5,1,4 ]
nm.face[1].colors = [3,2,3]
nm.face[2].colors = [3,3,2]
nm.face[3].colors = [1,3,2]
nm.face[4].colors = [1,2,3]
nm.face[5].colors = [1,3,2]
nm.face[6].colors = [1,2,3]
nm.generateNormals(#flat)
nm.build()
nm = member("Shapes").newModel("Pyramid1", nm)
See also
newModelResource
newModel
Usage
member( whichCastmember ).newModel( newModelName \
{, whichModelResource } )
Description
3D command; creates a new model in the referenced cast member. All new models have their
property set to
resource
Parameters
Required. Specifies the name of the new model. The name of the new model must
newModelName
be unique.
whichModelResource
Example
This statement creates a model called New House within the cast member 3D World.
member("3D World").newModel("New House")
Alternatively, the model resource for the new model can be set with the optional
whichModelResource
member("3D World").newModel("New House", member("3D \
World").modelResource("bigBox"))
424
Chapter 12: Methods
command to construct the mesh.
build
by default.
VOID
Optional. Specifies a model resource to create the model from.
parameter.
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers