The following methods provide general access to the Mapping channels, the mapping vertices and faces.
Topic Navigation: | |
---|---|
Number Of Map Vertices And Faces Default Texture Mapping Channel (Channel 1) |
Vertex And Face Color And Alpha |
Sets the number of map channels available. The number of map channels can be set from 2 to 100. Map channels 1 and 2 are the Vertex Color and default Texture Map channels. If keep: is false , the old mapping information is discarded. If true , the old mapping information is retained after the resize.
Sets whether the specified mapping channel is supported or not. If support is true , and the channel support state is currently false , a new map face array of the same size as the number of faces in the mesh is allocated, but no map vertex array is allocated. If support is false , and the channel support state is currently true , existing map channel face and vertex arrays are deallocated. If support and the current channel support state are both the same, no action is performed. SetNumMaps() is automatically called if the specified map channel is not available.
mapChannel index values are 0-based, with Map channels 0 and 1 being the Vertex Color and default Texture Map channels.
Returns whether the specified map channel is supported. This signifies that a map face arrayis present, but not necessarily a map vertex array.
Sets the number of vertices for the map channel, initializing the map vertex array. If keep: is false or not specified, the old map vertex information is discarded. If true , the old map vertex information is retained after the resize.
Returns the number of vertices for the map channel as an <integer>.
meshop.setNumMapFaces <Mesh mesh> <Integer mapChannel> <Integer count> keep:<boolean=false> keepCount:<int=0>
Sets the number of faces for the map channel. If keep: is false or not specified, the old map face information is discarded. If true , the old map face information from the number of faces specified by keepCount: is retained after the resize. Dangerous to use with map channels 0 and 1, so miminummapChannelvalue is 2.
Returns the number of faces for the map channel as an <integer>.
Returns the number of Color Per Vertex mapping channel vertices.
Sets the number of Color Per Vertex mapping channel vertices.
Returns the number of Default Texture mapping channel vertices.
Sets the number of Default Texture mapping channel vertices.
Sets the number of map faces to the number of mesh faces, retaining existing mapping data if keep is true. Deletes any map vertices that are not used by the map faces.
Sets the number of map faces to the number of mesh faces, and the number of map vertices to the number of mesh vertices. The map face vertices are set to the same vertex index as the corresponding mesh face vertices (i.e., there will be a 1-to-1 correspondence between map faces/vertices and the mesh faces/vertices). The map vertex UVW coordinates are set to the normalized (0 to 1) position of the corresponding mesh vertex in the mesh's bounding box.
Applies a simple planar mapping to the specified channel. This is done by copying the mesh topology and vertex locations into the map, resizing the face and vertex arrays if necessary.
meshop.applyUVWMap <TriMesh mesh> {#planar | #cylindrical | #spherical | #ball | #box> | #face} \ utile:<float=1.0> vtile:<float=1.0> wtile:<float=1.0> uflip:<boolean=false> vflip:<boolean=false> wflip:<boolean=false> cap:<boolean=true> tm:<Matrix3=identity matrix> channel:<int=1>
Applies the specified mapping type to the mapping channel.
utile/vtile/wtile - Number of tiles in the U/V/W directions.
uflip/vflip/wflip - U/V/W are mirrored if true .
cap - used with #cylindrical . If true , then any face normal that is pointing more vertically than horizontally will be mapped using planar coordinates.
tm - defines the mapping space. As each point is mapped, it is multiplied by this matrix, and then it is mapped.
channel - the mapping channel the mapping is applied to, defaults to channel 1.
Sets the coordinates of the specified map vertex.
See Accessing the Viewport Vertex Alpha Values for some more details.
Returns the coordinates of the specified map vertex as a <point3>.
See Accessing the Viewport Vertex Alpha Values for some more details.
Sets the map vertices for the specified map face.
Returns the vertices of the specified map face as a <point3>.
Returns a bitarray of size=(#map faces for channel inmesh) with bits set for all map faces that use the specified map vertices.
See splitMeshByUVElements script in the FAQ for example usage.
Returns a bitarray of size=(#map vertices for channel inmesh) with bits set for all map vertices that use the specified map faces.
See splitMeshByUVElements script in the FAQ for example usage.
For the specified map channel, sets the map vertex color to value between 0 (transparent) and 1 (opaque) for the map vertices used by the map faces associated with the specified faces.
For the specified map channel, sets the map vertex color to <color> for the map vertices used by the map faces associated with the specified faces.
For the specified map channel, sets the map vertex color to a value between 0 (transparent) and 1 (opaque) for the map vertices associated with the specified mesh vertices.
See Accessing the Viewport Vertex Alpha Values for some more details.
For the specified map channel, sets the map vertex color to <color> for the specified map vertices.
Returns a <bitarray> with a bit set for each isolated map vertex (unreferenced by any map face) for the specified channel.
For all mapping channels, deletes all mapping vertices that are not used by a mapping face.
meshop.deleteMapVertSet <Mesh mesh> <Integer mapChannel> {<BitArray set> | <Integer index> | <integer array>}
Deletes the specified map vertices. Returns a <bitarray> with a bit set for each map face that used one of the deleted map vertices. Normally, you should delete or modify the map faces using the map vertices before deleting the map vertices, as after the vertex deletion you can't tell which vertex on a face was a vertex that was deleted.
Deallocates the map vertex array and sets the number of map vertices to 0.
Deallocates the map face array and sets the number of map faces to 0.
Deletes the map vertex and face arrays for the specified channel, and sets their count to 0.