MAXScript Language Reference > 3ds Max Objects > Editable Meshes, Splines, Patches, and Polys > Editable_Poly >

# Editable_Poly Mapping Methods

| Editable Poly - Quick Navigation

The following methods are specific to Editable_Poly Mapping, Vertex and Edge Data:

Topic Navigation: |
--- | ---
Mapping Channels Vertex Colors VData Channels EData Channels |

## Mapping Channels Methods

| Back To Topic Navigation |  | Graphite Modeling Tools - Quick Navigation

WARNING!
All channels are 0-based!

    polyop.setNumMaps <Poly poly> <int count> keep:<boolean=true>

Sets the number of map channels available.

The number of map channels can be set from 0 to 100.

Map channels 0 and 1 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.

    polyop.getNumMaps <Poly poly>

Returns the number of map channels available as an <integer> .

    polyop.setMapSupport <Poly poly> <int mapChannel> <Boolean support>

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.

This method was previously broken but was fixed in 3ds Max 2008.

    polyop.getMapSupport <Poly poly> <int mapChannel>

Returns whether the specified map channel is supported.

This signifies that a map face array is present, but not necessarily a map vertex array.

    polyop.setNumMapVerts <Poly poly> <int mapChannel> <int count> keep:<boolean=false>

Sets the number of vertices for the map channel, initializing the map vertex array.

If <keep> is fals , the old map vertex information is discarded.

If true , the old map vertex information is retained after the resize.

    polyop.getNumMapVerts <Poly poly> <int mapChannel>

Returns the number of vertices for the map channel as an <integer> .

    polyop.setNumMapFaces <Poly poly> <int mapChannel> <int count> keep:<boolean=false>

Sets the number of faces for the map channel.

If keep is false , the old map face information is discarded.

If true , the old map face information is retained after the resize.

Dangerous to use with map channels 0 and 1.

    polyop.getNumMapFaces <Poly poly> <int mapChannel>

Returns the number of faces for the map channel as an <integer> .

    polyop.setMapVert <Poly poly> <int mapChannel> <int index> <Point3 uvw>

Sets the coordinates of the specified map vertex.

    polyop.getMapVert <Poly poly> <int mapChannel> <int index>

Returns the coordinates of the specified map vertex as a <point3> .

    polyop.setMapFace <Poly poly> <int mapChannel> <int map face index> <map vertex array>

Sets the map vertices for the specified map face.

    polyop.getMapFace <Poly poly> <int mapChannel> <int index>

Returns the vertex indices of the specified map face as an array.

    polyop.defaultMapFaces <Poly poly> <int mapChannel>

Allocates and initializes a basic planar map, or a white map for the vertex color hannel.

    polyop.applyUVWMap <Poly poly> \
    <#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:<integer=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.

## Vertex Colors Methods

| Back To Topic Navigation |  | Graphite Modeling Tools - Quick Navigation

    polyop.getVertsByColor <Poly poly> <Color color><Float red_thresh>\
    <Float green_thresh><Float blue_thresh>\
    channel:<int=0>

Returns the vertices whose vertex color is within the color range as a <bitarray> .

The range values should be in the range of 0 to 255.

    polyop.getVertsByColor <Poly poly> <Point3 uvw> <Float u_thresh> \
    <Float v_thresh> <Float w_thresh> channel:<int=0>

Returns the vertices whose UVW is within the UVW range as a <bitarray> .

The range values should be in the range of 0 to 1.

    polyop.setVertColor <Poly poly> <int mapChannel> <vertlist> <Color color>

Sets the vertex color for the specified vertices in the specified <mapChannel> .

    polyop.SetFaceColor <Poly poly> <int mapChannel> <facelist> <Color color>

Sets the vertex color for the vertices used by the specified faces in the specified <mapChannel> .

## VData Channels Methods

| Back To Topic Navigation |  | Graphite Modeling Tools - Quick Navigation

    polyop.setNumVDataChannels <Poly poly> <int count> keep:<boolean=true>

Sets the number of vertex data channels available. The number of vertex data channels can be set from 0 to 100.

If <keep> is false , the old channel data is discarded. If true , the old channel data is retained after the resize. The first ten channels for Discreet's use only.

channel 1: Soft Selection

channel 2: Vertex weights (for NURMS MeshSmooth)

channel 3: Vertex Alpha values

channel 4: Cornering values for subdivision use

    polyop.getNumVDataChannels <Poly poly>

Returns the number of vertex data channels available as an <integer> .

    polyop.setVDataChannelSupport <Poly poly> <int vdChannel> <boolean support>

Sets whether the specified vertex data channel is supported or not.

<vdChannel> index values are 1-based, The first ten channels for Autodesk's use only.

channel 1: Soft Selection

channel 2: Vertex weights (for NURMS MeshSmooth)

channel 3: Vertex Alpha values

channel 4: Cornering values for subdivision use

    polyop.getVDataChannelSupport <Poly poly> <int vdChannel>

Returns whether the specified vertex data channel is supported.

    polyop.getVDataValue <Poly poly> <int vdChannel> <int vertex_index>

Returns the floating point data value associated with vertex vertex_index in vertex data channel <vdChannel> as a <float> .

    polyop.setVDataValue <Poly poly> <int vdChannel> <vertlist> <float>

Sets the floating point data value associated with the specified vertices in vertex data channel <vdChannel> .

    polyop.freeVData <Poly poly> <int vdChannel>

    polyop.resetVData <Poly poly> <int vdChannel>

Deallocates the existing vertex data channel and turns off the vertex data channel support state.

These methods do the exact same thing.

## EData Channels Methods

| Back To Topic Navigation |  | Graphite Modeling Tools - Quick Navigation

    polyop.setNumEDataChannels <Poly poly> <int count> keep:<boolean=true>

Sets the number of edge data channels available. The number of edge data channels can be set from 0 to 10.

If <keep> is false , the old channel data is discarded.

If true , the old channel data is retained after the resize.

The first two channels for Autodesk's use only.

channel 1: edge knot data

channel 2: edge crease data

    polyop.getNumEDataChannels <Poly poly>

Returns the number of edge data channels available as an <integer> .

    polyop.setEDataChannelSupport <Poly poly><int edChannel><Boolean support>

Sets whether the specified edge data channel is supported or not.

<edChannel> index values are 1-based, the first two channels for Autodesk's use only.

channel 1: edge knot data

channel 2: edge crease data

    polyop.getEDataChannelSupport <Poly poly> <int edChannel>

Returns whether the specified edge data channel is supported.

    polyop.getEDataValue <Poly poly> <int edChannel> <int edge_index>

Returns the floating point data value associated with edge edge_index in edge data channel <edChannel> as a <float> .

    polyop.setEDataValue <Poly poly> <int edChannel> <edgelist> <float>

Sets the floating point data value associated with the specified edges in edge data channel <edChannel> .

    polyop.freeEData <Poly poly> <int edChannel>

    resetEData <Poly poly> <int edChannel>

Deallocates the existing edge data channel and turns off the edge data channel support state.

These methods do the exact same thing.

| Back To Topic Navigation |  | Graphite Modeling Tools - Quick Navigation

#### See Also

- Editable_Poly Properties

- Editable_Poly Methods

- Editable_Poly Geometry Methods (polyOp struct)

- Interface: EditablePoly