The functions below work on the UVW mesh allowing you to rearrange the topology or add new topology.
Unwrap has topology similar to meshes but it has been changed to support everything except patches and polygons at the same time. Unwrap has a list of Point3 values which are the texture vertices positions. Then there are texture faces which contain an array of integers which are indices into the texture vertex list. There can be 3 to N number of ints in this array depending on the topology being fed into Unwrap. In addition to this, there are also 2 arrays of integers for the handles and interior handles if the topology is a patch which also points into the texture vertex list. The functions below allow you to manipulate these arrays to do things like break, weld, and perform other topological functions.
This marks a vertex that it is dead, and no longer in use.
Vertices are not actually deleted they are just marked and recycled when needed. That means that when a vertex is added vertices marked as dead will be the first ones checked. If there are no dead vertices, the vertex is appended to the end of the list. Use this function carefully, since marking a vertex in use as dead will cause strange results.
<integer> index - The index of the vertex to mark as dead.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the numbers of vertices that a face contains.
A face can contain 3 to N number of points depending on what type of topology Unwrap is working on. For Tri Meshes this is always 3; for patches this can be 3 or 4; and for polygons this can be 3 or greater. Unwrap abstracts all three object types into one generic format.
<integer> index - The index of the face that you are inspecting.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the index of a vertex from a face.
A face contains 0 to N number of vertices, so to retrieve a particular vertex index, you give it the face index and the ith vertex that you want to inspect. For example, if you wanted to look at the 3 vertex on face 1 you would call GetVertexIndexFromFace (1,3).
<integer> FaceIndex - The index of the face that you want to inspect.
<integer> IthVertex - The ith vertex of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the index of a handle, from a face, which contains 0 to N number of handles.
To retrieve a particular handle index, you give it the face index and the ith handle that you want to inspect. For example, if you wanted to look at the 3 handle on face 1 you would call GetHandleIndexFromFace 1 3. This only applies to patch meshes.
<integer> FaceIndex - The index of the face that you want to inspect.
<integer> IthVertex - The ith handle of that you want to retrieve. This value should range from 1 to the twice the number of vertices that the face contains.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the index of a interior handle from a face.
A face contains 0 to N number of interior handles, so to retrieve a particular interior handle index, you give it the face index and the i-th interior handle that you want to inspect. For example, if you wanted to look at the 3rd interior handle on face 1 you would call GetInteriorIndexFromFace 1 3. This only applies for patch meshes.
<integer> FaceIndex - The index of the face that you want to inspect.
<integer> IthVertex - The ith interior handle of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the index of a geometric vertex from a face.
This is the vertex that is attached to the mesh and not the texture faces. A face contains 0 to N number of vertices, so to retrieve a particular vertex index, you give it the face index and the ith vertex that you want to inspect. For example, if you wanted to look at the 3 vertex on face 1 you would call GetVertexGeomIndexFromFace 1 3.
<integer> FaceIndex - The index of the face that you want to inspect.
<integer> IthVertex - The ith vertex of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the index of a geometric handle from a patch. This the handle that is attached to the patch and not the texture faces. A face contains 0 to N number of handles, so to retrieve a particular handle index, you give it the face index and the ith handle that you want to inspect. For example, if you wanted to look at the 3 handle on face 1 you would call GetHandleGeomIndexFromFace(1,3).
<integer> FaceIndex - The index of the face that you want to inspect.
<integer> IthVertex - The ith handle of that you want to retrieve. This value should range from 1 to twice the number of vertices that the face contains.
Exposed via unwrap interface in 3ds Max 4 and higher.
This retrieves the index of a geometric interior handle from a patch.
This the interior handle that is attached to the patch and not the texture faces. A face contains 0 to N number of interior handles, so to retrieve a particular interior handle index, you give it the face index and the ith interior handle that you want to inspect. For example, if you wanted to look at the 3 interior handle on face 1 you would call GetInteriorGeomIndexFromFace (1,3).
<integer> FaceIndex - The index of the face that you want to inspect.
<integer> IthVertex - The ith interior handle of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.
Exposed via unwrap interface in 3ds Max 4 and higher.
This allows you to manipulate the position of vertex attached to a face.
Basically, it detaches the vertex if multiple faces share that vertex and then moves it to the position specified. So if you want to move the 3 rd vertex of face 1 to (.5,.5,.0) you would do setFaceVertex [.5 .5 .0] 1 3. If you don’t want the vertex broken use SetVertexSPosition.
<point3> pos - The position that you want to move a vertex to.
<integer> faceIndex (integer) - The index of the face that you wish to work on.
<integer> ithVertex (integer) - The ith vertex of the face that you want to change.
<boolean> sel - Whether or not to select the vertex after it is recreated.
Exposed via unwrap interface in 3ds Max 4 and higher.
Identical to SetFaceVertex except works on patch handles.
<point3> pos - The position that you want to move a vertex to.
<integer> faceIndex (integer) - The index of the face that you wish to work on.
<integer> ithVertex (integer) - The ith vertex of the face that you want to change.
<boolean> sel - Whether or not to select the vertex after it is recreated.
Exposed via unwrap interface in 3ds Max 4 and higher .
Identical to SetFaceVertex except works on patch interior handles.
<point3> pos - The position that you want to move a vertex to.
<integer> faceIndex (integer) - The index of the face that you wish to work on.
<integer> ithVertex (integer) - The ith vertex of the face that you want to change.
<boolean> sel - Whether or not to select the vertex after it is recreated.
Exposed via unwrap interface in 3ds Max 4 and higher.
This allows you to set the index of the ith vertex of a face.
For example, if you wanted to change the index of the 3 rd vertex of face 1 to 100 you would call setFaceVertexIndex 1 3 100.
<integer> faceIndex - Index of the face you want work on.
<integer> ithVertex - The ith vertex that you want to manipulate.
<integer> vertexIndex - The index into the vertex list that you want to set to.
Exposed via unwrap interface in 3ds Max 4 and higher.
Identical to setFaceVertexIndex but works on handles for patches.
<integer> faceIndex - Index of the face you want work on.
<integer> ithVertex - The ith vertex that you want to manipulate.
<integer> vertexIndex - The index into the vertex list that you want to set to.
Exposed via unwrap interface in 3ds Max 4 and higher.
Identical to setFaceVertexIndex but works on interior handles for patches.
<integer> faceIndex - Index of the face you want work on.
<integer> ithVertex - The ith vertex that you want to manipulate.
<integer> vertexIndex - The index into the vertex list that you want to set to.
Exposed via unwrap interface in 3ds Max 4 and higher.
This sets a flag to determines how Unwrap will behave when a topology change occurs.
If update is TRUE the mapping gets reset, otherwise unwrap skips mapping the object if it has a different topology. It is sometimes useful to turn this off if you have MeshSmooth or other topology changing modifiers below Unwrap that have different topologies when rendering.
<boolean>update - Determines whether the mapping is reset on topology change.
Exposed via unwrap interface in 3ds Max 4 and higher.
Updates the Unwrap_UVW modifier to accept anyface selectioncoming from the modifier stack.
For example, create a sphere, add a MeshSelect modifier, add an Unwrap_UVW modifier. Go to Face Sub-Object level of Unwrap_UVW - there is no selection. Go down to MeshSelect and select some faces. Go back to Unwrap_UVW - there is still no face selection. Call this function and the MeshSelect face selection will be accepted by the Unwrap_UVW modifier.
Returns the number of texture vertices.
Exposed via unwrap interface in 3ds Max 4 and higher.
Returns the number of polygons in the object.
The following methods are available in 3ds Max 2008 and higher.
The Unwrap_UVW modifier in 3ds Max 2008 and higher supports multiple scene objects when applied as an instance.
The unwrap6 interface re-exposes some methods which used to be available in the Unwrap_UVW modifier, but this time it provides an additional argument to specify the node to operate on.
Returns the number of map vertices in the Unwrap_UVW modifier corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the number of selected polygons corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the polygons corresponding to the given node defined by the bitarray value.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns true of the indexed polygon of the given node is selected in the Unwrap_UVW modifier, false if not selected.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the number of polygons in the Unwrap_UVW modifier corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Marks the indexed vertex in the given node as dead.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the number of points in the indexed face of the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the vertex index of the i-th vertex of the indexed face of the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the handle index of the i-th vertex of the indexed face of the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<integer><Unwrap_UVW>.getVertexGeomIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node
Returns the index of the geometry vertex corresponding to the i-th vertex of the indexed face of the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<integer><Unwrap_UVW>.getHandleGeomIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node
Returns the handle of the geometry vertex corresponding to the i-th vertex of the indexed face of the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<integer><Unwrap_UVW>.getInteriorGeomIndexFromFaceByNode <integer>faceIndex <integer>ithVertex <node>node
Returns the interior geometry vertex index corresponding to the i-th vertex of the indexed face of the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setFaceVertexByNode <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel <node>node
Sets the position of the i-th vertex of the indexed face in the given node.
If the 4 th parameter is passed as true, the vertex will also be selected.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setFaceHandleByNode <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel <node>node
Sets thehandleposition of the i-th vertex of the indexed face in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setFaceInteriorByNode <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel <node>node
Sets the interior position of the i-th vertex of the indexed face in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setFaceVertexIndexByNode <integer>faceIndex <integer>ithVertex <integer>vertexIndex <node>node
Sets the vertex index of the i-th vertex of the indexed face in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setFaceHandleIndexByNode <integer>faceIndex <integer>ithVertex <integer>vertexIndex <node>node
Sets the handle handle index of the i-th vertex of the indexed face in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setFaceInteriorIndexByNode <integer>faceIndex <integer>ithVertex <integer>vertexIndex <node>node
Sets the face interior index of the i-th vertex of the indexed face in the given node.
<void><Unwrap_UVW>.getAreaByNode <bitArray>faceSelection <&float>areaUVW <&float>areaGeom <node>node areaUVW is Out parameter areaGeom is Out parameter
Gets the map faces area and the geometry faces area of the faces specified by the bitArray in the given node.
The results are written into the two by-reference variables areaUVW and areaGeom .
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.getAreaByNode <bitArray>faceSelection <&float>x <&float>y <&float>width <&float>height <node>node x is Out parameter y is Out parameter width is Out parameter height is Out parameter
Gets the upper left corner, the width and the height of the faces specified by the bitArray in the given node.
The results are written into the four by-reference variables x, y, width and height .
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns a bitarray of the selected seams for pelting in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Sets the selected seams for pelting in the given node to the given bitArray.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the faces supplied by the bitArray in the given node.
When update is given as true, updates the selection display. This selection method gives you an option to not update the view if you are doing lots of face processing.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Sketches UV coordinates of the given node using the supplied index list array and the position list array.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the normal of the indexed face in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the position of the indexed map vertex of the node given by the third argument at the time given by the first argument.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Sets the position of the indexed map vertex of the node given by the fourth argument at the time given by the first argument to the position specified by the third argument.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
<void><Unwrap_UVW>.setVertexPosition2ByNode <time>time <integer>index <point3>pos <boolean>hold <boolean>update <node>node
An extended version of the setVertexPosition method with control over Holding and Updating.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns the Vertex Weight of the specified vertex in the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Sets the Vertex Weight of the specified vertex in the given node to the value defined by the second argument.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns true if the weight of the indexed vertex in the given node has been modified, false otherwise.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Sets the modified flag of the indexed vertex in the given node to the Boolean value provided by the second argument.
Returns a bitarray with the map vertices selected in the Unwrap_UVW modifier and corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the map vertices in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns true if the indexed map vertex is selected, false otherwise.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns a bitarray with the faces selected in the Unwrap_UVW modifier and corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the faces in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns true if the indexed face is selected, false otherwise.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns a bitarray with themap edgesselected in the Unwrap_UVW modifier and corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the map edges in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns true if the indexed map edge is selected, false otherwise.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Returns a bitarray with the geometry vertices selected in the Unwrap_UVW modifier and corresponding to the given node.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the vertices in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the geometry edges in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.
Exposed via unwrap6 interface in 3ds Max 2008 and higher.
Selects the geometry edges in the Unwrap_UVW modifier and corresponding to the given node, based on the provided bitarray.