Editable_Poly Mapping Methods

Editable_Poly Topics:

Editable_Poly: GeometryClass

Editable_Poly Properties

Editable_Poly Methods

Editable_Poly Geometry Methods (polyOp struct)

Interface: EditablePoly

The following methods are specific to mapping

Note: 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 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.

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.

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 false, 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

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

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 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.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

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 Discreet'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 Discreet'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.

Editable_Poly Topics:

Editable_Poly: GeometryClass

Editable_Poly Properties

Editable_Poly Methods

Editable_Poly Geometry Methods (polyOp struct)

Interface: EditablePoly