3D Lingo Dictionary > L-N > mesh (property) |  |

mesh (property)

Syntax

    member(whichCastmember).model(whichModel).meshdeform.mesh[index].meshProperty

Description

3D command; allows access to the mesh properties of models that have the `meshDeform` modifier attached. When used as `mesh.count` this command returns the total number of meshes within the referenced model.

The properties of each mesh that are accessible are:

colorList allows you to get or set the list of colors used by the specified mesh.

vertexList allows you to get or set the list of vertices used by the specified mesh.

normalList allows you to get or set the list of normal vectors used by the specified mesh.

textureCoordinateList allows you to get or set the texture coordinates used by the first texture layer of the specified mesh. To get or set the texture coordinates for any other texture layers in the specified mesh, use `meshdeform.mesh[``index``].texturelayer[``index``].textureCoordinateList`.

textureLayer[index] allows you get and set access to the properties of the specified texture layer.

face[`index`] allows you to get or set the vertices, normals, texture coordinates, colors, and shaders used by the faces of the specified mesh.

face.count allows you to obtain the total number of faces found within the specified mesh.

Note: For complete information about these properties, see the individual entries (listed in the "See also" section of this entry).

Examples

The following Lingo adds the `#meshDeform` modifier to the model named thing1 and then displays the vertexList for the first mesh in the model named thing1.

    member("newAlien").model("thing1").addModifier(#meshDeform)
    put member("newalien").model("thing1").meshDeform.mesh[1].vertexList
    -- [vector(239.0, -1000.5, 27.4), vector(162.5, -1064.7, 29.3), vector(115.3, -1010.8, -40.6),
    vector(239.0, -1000.5, 27.4), vector(115.3, -1010.8, -40.6),
    vector(162.5, -1064.7, 29.3), vector(359.0, -828.5, -46.3),
    vector(309.9, -914.5, -45.3)]

The following statement displays the number of meshes found within the model named "Aircraft".

    put member("world").model("Aircraft").meshDeform.mesh.count
    -- 4

See also

`meshDeform (modifier)`, `colorList`, `textureCoordinateList`, `textureLayer`, `normalList`, `vertexList (mesh deform)`, `face`