The following methods provide access to the Vertex Data channels.
Methods:
meshop.setNumVDataChannels <Mesh mesh> <Integer count> [keep:<boolean=false>]
Sets the number of vertex data channels available. The number of vertex data channels can be set from 0 to 100. The first ten channels are for internal use only.
If keep:
is fals
or not specified, the old channel data is discarded.
If true
, the old channel data is retained after the resize.
The predefined channels are:
channel 1: Soft Selection
channel 2 Vertex weights (for NURMS MeshSmooth)
channel 3 Vertex Alpha values
channel 4 Cornering values for subdivision use
meshop.getNumVDataChannels <Mesh mesh>
Returns the number of vertex data channels available as an <integer>
.
meshop.setVDataChannelSupport <Mesh mesh> <Integer vdChannel> <Boolean support>
Sets whether the specified vertex data channel is supported or not.
If <support>
is true
, and the channel support state is currently false
, a new vertex data array of the same size as the number of vertices in the mesh is allocated.
If <support>
is false
, and the channel support state is currently true
, the existing vertex data channel array is deallocated.
If <support>
and the current channel support state are both the same, no action is performed.
setNumVDataChannels()
is automatically called if the specified vertex data channel is not available. vdChannel
index values are 1-based, with channels 1 and 2 being the Vertex Soft Selection and Vertex Weight channels.
meshop.getVDataChannelSupport <Mesh mesh> <Integer vdChannel>
Returns whether the specified vertex data channel is supported.
meshop.getVDataValue <Mesh mesh> <Integer vdChannel> <Integer vert_index>
Returns the floating point data value associated with vertexvert_indexin vertex data channelvdChannelas a <float>
.
meshop.setVDataValue <Mesh mesh> <Integer vdChannel> <Integer vert_index> <Float value>
Sets the floating point data value associated with vertexvert_indexin vertex data channelvdChannel.
meshop.freeVData <Mesh mesh> <Integer vdChannel>
Deallocates the existing vertex data channel array and turns off the vertex data channel support state.
meshop.getVSelectWeight <Mesh mesh> <int vertIndex>
Returns the Vertex Selection Weight data value for the specified vertex.
meshop.setVSelectWeight <Mesh mesh> <vertlist> <float weight>
Sets the Vertex Selection Weight data value for the specified vertex.
meshop.resetVSelectWeights <Mesh mesh>
Sets the Vertex Selection Weight data value to 1.0 for all vertices.
meshop.supportVSelectWeights <Mesh mesh>
Enables support of the Vertex Selection Weight channel.
meshop.freeVSelectWeights <Mesh mesh>
Deletes (deallocates) the Vertex Selection Weight data array.
meshop.getVertWeight <Mesh mesh> <int vertIndex>
Returns the Vertex Weight data value for the specified vertex.
meshop.setVertWeight <Mesh mesh> <vertlist> <float weight>
Sets the Vertex Weight data value for the specified vertex.
meshop.resetVertWeights <Mesh mesh>
Sets the Vertex Weight data value to 1.0 for all vertices.
meshop.supportVertWeights <Mesh mesh>
Enables support of the Vertex Weight channel.
meshop.freeVertWeights <Mesh mesh>
Deletes (deallocates) the Vertex Weight data array.
meshop.getVAlpha <Mesh mesh> <int vertIndex>
Returns the Vertex Alpha data value for the specified vertex.
meshop.setVAlpha <Mesh mesh> <vertlist> <float alpha>
Sets the Vertex Alpha data value for the specified vertex.
meshop.resetVAlphas <Mesh mesh>
Sets the Vertex Alpha data value to 1.0 for all vertices.
meshop.supportVAlphas <Mesh mesh>
Enables support of the Vertex Alpha channel.
meshop.freeVAlphas <Mesh mesh>
Deletes (deallocates) the Vertex Alpha data array.
meshop.getVertCorner <Mesh mesh> <int vertIndex>
Returns the Vertex Corner data value for the specified vertex.
meshop.setVertCorner <Mesh mesh> <vertlist> <float weight>
Sets the Vertex Corner data value for the specified vertex.
meshop.resetVertCorners <Mesh mesh>
Sets the Vertex Corner data value to 0.0 for all vertices.
meshop.supportVertCorners <Mesh mesh>
Enables support of the Vertex Corner channel.
meshop.freeVertCorners <Mesh mesh>
Deletes (deallocates) the Vertex Corner data array.
For more mesh-related methods, see