Unwrap_UVW : Modifier

Unwrap_UVW - superclass: modifier; super-superclass:MAXWrapper - classID: #(48180794, 1924812319)

Constructors

unwrap_UVW ...

UVWunwrap ...

Note: This class is not available in Autodesk VIZ.

Properties

<Unwrap_UVW>.baseMaterial UndefinedClass default: undefined -- material;

Get/Set the Base Material. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.checkerMaterial Standardmaterial default: UnwrapChecker:Standard -- material; SubAnim

Get/Set the Checker Material. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.texMapIDList ArrayParameter default: #() -- int array;

Get/Set the Texture Map ID list. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.texMapList ArrayParameter default: #() -- texturemap array;

Get/Set the Texture Map list. Available in 3ds Max 8 and higher.

 

<Unwrap_UVW>.vertexSnap BooleanClass default: true -- boolean; Vertex_Snap

Enable/Disable the Vertex Snap. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.edgeSnap BooleanClass default: true -- boolean; Edge_Snap

Enable/Disable the Edge Snap. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.gridSnap BooleanClass default: true -- boolean; Grid_Snap

Enable/Disable the Grid Snap. Available in 3ds Max 8 and higher.

 

<Unwrap_UVW>.showImageAlpha BooleanClass default: false -- boolean; Show_Image_Alpha

Enable/Disable the Show Image Alpha option in the Unwrap Options dialog. Available in 3ds Max 8 and higher.

Render UVW Template Tool

<Unwrap_UVW>.renderuv_width Integer default: 1024 -- integer; Width

Get/Set the Image Width. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_height Integer default: 1024 -- integer; Height

Get/Set the Image Height. Available in 3ds Max 8 and higher.

 

<Unwrap_UVW>.renderuv_force2sided BooleanClass default: true -- boolean; Force_2_Sided

Get/Set the state of the Force 2-Sided checkbox. Available in 3ds Max 8 and higher.

 

<Unwrap_UVW>.renderuv_fillColor Color default: (color 127.5 127.5 127.5) -- RGB color; Fill_Color

Get/Set the Fill Color value. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_fillalpha Float default: 1.0 -- float; Fill_Alpha

Get/Set the Fill Alpha value. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_fillmode Integer default: 0 -- integer; Fill_Mode

Get/Set the Fill Mode. Available in 3ds Max 8 and higher.

Possible values are:

0 - None

1 - Solid

2 - Normal

3 - Shaded

<Unwrap_UVW>.renderuv_showoverlap BooleanClass default: true -- boolean; Overlap

Get/Set the state of the Show Overlap checkbox. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_overlapColor Color default: (color 255 0 0) -- RGB color; Overlap_Color

Get/Set the Overlap color. Available in 3ds Max 8 and higher.

 

<Unwrap_UVW>.renderuv_edgeColor Color default: (color 255 255 255) -- RGB color; Edge_Color

Get/Set the Edge color. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_edgealpha Float default: 1.0 -- float; Edge_Alpha

Get/Set the Edge Alpha value. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_visibleedges BooleanClass default: true -- boolean; Visible_Edges

Get/Set the state of the Visible Edges checkbox. When true, visible edges will be rendered. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_invisibleedges BooleanClass default: false -- boolean; Invisible_Edges

Get/Set the state of the Invisible Edges checkbox. When true, invisible edges will be rendered. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_seamedges BooleanClass default: true -- boolean; Seam_Edges

Get/Set the state of the Seam Edges checkbox. When true, seam edges will be rendered. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_seamColor Color default: (color 0 255 0) -- RGB color; Seam_Color

Get/Set the color to render Seam Edges with. Available in 3ds Max 8 and higher.

<Unwrap_UVW>.renderuv_showframebuffer BooleanClass default: true -- boolean; Show_Frame_Buffer

When true, the frame buffer will be displayed. Available in 3ds Max 8 and higher.

Unwrap Interfaces

Click here to go directly to the unwrap2 interface methods added in 3ds Max 5

Click here to go directly to the unwrap3 interface methods added in 3ds Max 6

Click here to go directly to the unwrap4 interface methods added in 3ds Max 7

Click here to go directly to the unwrap5 interface methods added in 3ds Max 8

 

Interface: unwrap

Methods

Modify Panel User Interface Controls

The following methods require that the Unwrap UVW modifier be the displayed modifier in the Modify panel, and that the Modify panel is active.

Modifier UI Buttons

<void>planarMap()

Presses the Planar Map button in the modifier’s UI

<void>save()

Presses the Save button in the modifier’s UI

<void>load()

Presses the Load button in the modifier’s UI

<void>reset()

Presses the Reset button in the modifier’s UI

<void>edit()

Presses the Edit button in the modifier’s UI

Map Channel Settings

<void>setMapChannel <integer>mapChannel

Sets the Map Channel field in the modifier’s UI

<integer>getMapChannel()

Returns the mapping channel set for editing in the modifier’s UI.

Note that Channel 1 returns 0 instead. This is for backwards compatibility with older max versions where the only UVW Channel was 0 and the Vertex Color channel was 1.

0 - UVW Channel 1

1 - Vertex Colors Channel

2..99 - UVW Channels 2 .. 99

Example:

$.unwrap_uvw.unwrap.setMapChannel 10  --set map channel to 10

$.unwrap_uvw.unwrap.getMapChannel () --returns 10

$.unwrap_uvw.unwrap.setMapChannel --set map channel to 1

$.unwrap_uvw.unwrap.getMapChannel () --although set to 1, returns 0

$.unwrap_uvw.unwrap.setMapChannel --set map channel to 2

$.unwrap_uvw.unwrap.getMapChannel () --returns 2

 

<void>setVC <boolean>vertexColor

When set to true, activates the Vertex Colors radio button in the Channel Group. When set to false, enables Map Channels.

<boolean>getVC()

Returns the state of the Vertex Color Channel radio button in the rollup.

Projection Type

<void>setProjectionType <integer>projection

Where projection is the type of mapping you want:

1 - X aligned

2 - Y aligned

3 - Z aligned

4 - normal aligned

<integer>getProjectionType()

Returns the state of the mapping align radio buttons:

1 - X aligned

2 - Y aligned

3 - Z aligned

4 - normal aligned

Edit Floater

Move/Rotate/Scale

<void>move()

Presses the Move button in the edit floater.

<void>moveH()

Presses the Move Horizontal button in the edit floater.

<void>moveV()

Presses the Move Vertical button in the edit floater.

<void>rotate()

Presses the Rotate button in the edit floater.

<void>scale()

Presses the Scale button in the edit floater.

<void>scaleH()

Presses the Scale Horizontal button in the edit floater.

<void>scaleV()

Presses the Scale Vertical button in the edit floater.

<void>mirrorH()

Presses the Mirror Horizontal button in the edit floater.

<void>mirrorV()

Presses the Mirror Vertical button in the edit floater.

<void>expandSelection()

Presses the Expand Selection button in the edit floater.

<void>contractSelection()

Presses the Contract Selection button in the edit floater

Falloff

<void>setFalloffType <integer>falloff

Sets the falloff type in the edit floater, where falloff defines the falloff type:

1 - Smooth falloff

2 - Linear falloff

3 - Slow Out falloff

4 - Fast Out falloff

<integer>getFalloffType()

Returns the falloff type in the edit floater:

1 - Smooth falloff

2 - Linear falloff

3 - Slow Out falloff

4 - Fast Out falloff

<void>setFalloffSpace <integer>space

Sets the falloff space in the edit floater, where space defines the space you want the falloff to be computed in:

1 - XY (The local space of the object.)

2 - UV (The UVW space of the object.)

<integer>getFalloffSpace()

Returns the falloff space in the edit floater.

<void>setFalloffDist <integer>distance

Sets the falloff distance in the edit floater.

<float>getFalloffDist()

Returns the falloff distance from the edit floater.

Break and Weld

<void>breakSelected()

Presses the Break Selected button in the edit floater.

<void>weld()

Presses the Target Weld button in the edit floater.

<void>weldSelected()

Presses the Weld Selected button in the edit floater.

<float>getWeldThresold()

Returns the weld threshold

<void>setWeldThreshold <float>height

Sets the threshold values for welds.

Texture Map Display

<void>updateMap()

Presses the Update Map button in the edit floater.

<void>displayMap <boolean>displayMap

Toggles the Display Map button in the edit floater.

<boolean>isMapDisplayed()

Returns the state of the Display Map button.

<integer>getCurrentMap()

Returns the index into the map drop down list of the current map in the view of the edit floater.

<void>SetCurrentMap <integer>map

Changes the currently displayed map to the index provided, where map is the index of the map in the drop down list that you want to display.

<integer>numberMaps()

Returns the number of maps in the map drop down list.

UV Space

<void>setUVSpace <integer>UVSpace

Sets the UV Space fly out in the edit floater, where UVSpace defines the space that you want to view the texture vertices in:

1 - UV

2 - VW

3 - UW

<integer>GetUVSpace()

Returns the state of the UV Space fly out in the edit floater:

1 - UV

2 - VW

3 - UW

<void>options()

Presses the Options button in the edit floater.

Lock/Hide/Freeze

<void>lock()

Toggles the Lock Selected Vertices button in the edit floater.

<void>hide()

Presses the Hide button in the edit floater.

<void>unhide()

Presses the Unhide button in the edit floater.

<void>freeze()

Presses the Freeze button in the edit floater.

<void>unfreeze()

Presses the Unfreeze button in the edit floater.

<void>filterSelected()

Toggles the Filter Selected Faces button in the edit floater.

Pan and Zoom

<void>pan()

Presses the Pan button in the edit floater.

<void>zoom()

Presses the Zoom button in the edit floater.

<void>zoomRegion()

Presses the Zoom Region button in the edit floater.

<void>fit()

Presses the Fit button in the edit floater.

<void>fitSelected()

Presses the Fit Selected button in the edit floater.

<void>ZoomToGizmo <boolean>all

This zooms the selected or all the viewports to zoom to the current planar map gizmo.

<boolean>all - Determines whether the active or all the viewports get zoomed.

<void>UpdateView()

This forces the viewport and dialog to update.

Snap

<void>snap()

Presses the Snap button in the edit floater.

<boolean>getMidPixelSnap()

Returns a boolean value which indicated whether the mid pixels snap is used, if it is false the snap is set to the bottom right corner of the pixel, else it snaps to the center of the pixel.

<void>setMidPixelSnape <boolean>snap

Sets whether mid pixels snap is used. When false, the snap is set to the bottom right corner of the pixel. When true, it snaps to the center of the pixel.

Colors

<point3>getLineColor()

Returns the color of the lines used to connect the texture vertices edges as a Point3 value.

<void>setLineColor <point3>color

Sets the line color of the texture vertices.

<point3>getSelectionColor()

Returns the texture vertices selection color as a Point3 value.

<void>setSelectionColor <point3>color

Sets the color of selected texture vertices.

Render Size

<integer>getRenderWidth()

Returns the width of the bitmap used to render 2d/3d textures to.

<void>setRenderWidth <integer>width

Sets the width in pixels of the bitmap used to render to for display.

<integer>getRenderHeight()

Returns the height of the bitmap used to render 2d/3d textures to.

<void>setRenderHeight <integer>height

Sets the height in pixels of the bitmap used to render to the display.

<boolean>getUseBitmapRes()

Returns the state of the Use Bitmap Resolution as a boolean value. If false, the bitmaps are rendered using the RenderWidth/Height values.

<void>setUseBitmapRes <boolean>useRes

Set to true to use the bitmap resolution, false to use the render width and height.

Viewport Display Update

<boolean>getConstantUpdate()

Returns the state of Constant Update as a boolean value. When true, viewport is updated on every move, otherwise it is just updated on mouse up. 

<void>setConstantUpdate <boolean>update

Sets the state of the Constant Update value. When true, the viewport is updated on every move, otherwise it is just updated on mouse up. 

<boolean>getShowSelectedVertices()

Returns a boolean value which indicates whether the selected texture vertices are also displayed in the viewports.

<void>setShowSelectedVertices <boolean>show

Sets whether the selected texture vertices are also displayed in the viewport.

Material ID

<integer>getMatID()

Returns the current material id index filter.

<void>setMatID <integer>matid

Sets the material drop list to the index supplied.

<integer>numberMatIDs()

Returns the number of material ids in the material id filter drop down.

Number Of ...

<integer>NumberVertices()

Returns the number of texture vertices.

<integer>numberPolygons()

Returns the number of polygons in the object.

Vertex Selection

<bitArray>getSelectedVertices()

Returns the current selected texture vertices in the edit floater as a bitarray.

<void>selectVertices <bitArray>selection

Selects texture vertices in the edit floater dialog.

<boolean>isVertexSelected <integer>index

Returns a boolean value which indicates whether a texture vertex is selected.

index (integer) - The index of the vertex to check.

<void>GetSelectionFromFace()

Takes the current polygon selection and uses it to select the texture vertices that are associated with it.

Transform Selected Vertices

<void>moveSelectedVertices <point3>offset

Moves the selected texture vertices by the specified offset.

<void>rotateSelectedVerticesCenter <float>angle

Rotates the selected vertices around their center point.

angle (float) - The angle in radians that you want to rotate the selection by.

<void>RotateSelectedVertices <float>angle <point3>axis

Rotates the selected vertices around a specific axis

where

angle is the angle in radians that you want to rotate the selection by.

axis is the axis that you want to rotate the selected vertices about. This is in the space of the window.

<void>scaleSelectedVerticesCenter <float>scale <integer>dir

Scales the selected points around their center,

where

scale is the amount that you want to scale by.

dir is the direction you want to scale in:

0 - Scales uniform

1 - Scales in the x

2 - Scales in the y

<void>scaleSelectedVertices <float>scale <integer>dir <point3>axis

Scales the selected points around their center around the axis

where

scale is the amount that you want to scale by.

dir is the direction you want to scale in:

0 - Scales uniform

1 - Scales in the x

2 - Scales in the y

axis (point3) - The axis that you want to scale the selected vertices along. This is in the space of the window.

<point3>getVertexPosition <time>time <integer>index

Returns the position of the vertex as a Point3 value.

time (timevalue) - The time at which you wan to check.

index (integer) - The index of the vertex.

<void>moveX <float>p

This sets the selected vertices x values in absolute coordinates.

<float>p - The absolute position along the x axis.

<void>moveY <float>p

This sets the selected vertices y values in absolute coordinates.

<float>p - The absolute position along the y axis.

<void>moveZ <float>p

This sets the selected vertices xzvalues in absolute coordinates.

<float>p - The absolute position along the z axis.

Selected Polygons

<bitArray>getSelectedPolygons()

Returns the selected polygons in the view port as a bitarray.

<void>selectPolygons <bitArray>selection

Selects the polygons in the view ports.

<bitArray>sel - The polygons to select.

<boolean>isPolygonSelected <integer>index

Returns whether a polygon is selected or not.

<integer>index - Index of the polygon to check.

<void>detachEdgeVertices()

Detaches any vertex that is not completely surrounded by selected vertices. This is similar to a polygon selection detach except it uses the vertex selection to determine what is detached.

<void>flipHorizontal()

This presses the Flip Horizontal button in the edit floater dialog.

<void>flipVertical()

This presses the Flip Vertical button in the edit floater dialog.

Lock Aspect

<boolean>GetLockAspect()

Returns whether the edit window aspect ratio is locked or not. If the aspect ratio is not locked the image will try stretch to fit the aspect ratio of the window.

<void>SetLockAspect <boolean>aspect

This sets the Lock Aspect Ratio value.

<boolean>aspect - Aspect lock toggle.

Map Scale

<boolean>GetMapScale()

Returns the scaling factor when the user applies a planar map. The smaller the value the more planar map is scaled down

<void>SetMapScale <float>scale

Sets the scaling factor when the user applies a planar map. The smaller the value the more planar map is scaled down.

<float>scale - The scaling factor for planar map.

<void>SetVertexPosition <time>time <integer>index <point3>pos

This sets the position of a UVW vertex at a specific time.

<time>time - The time at what you want to set the pos.

<integer>index - The index of the vertex.

<point3>pos - The position of the vertex in UVW space.

Topology Editing

The functions below work on the UVW topology allowing you to rearrange the topology or add new topology. Use these with care since you can create invalid topology which can cause unpredictable results. 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 other topological functions.

<void>markAsDead <integer>index

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.

<integer>numberPointsInFace <integer>index

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.

<integer>getVertexIndexFromFace <integer>faceIndex <integer>ithVertex

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.

<integer>getHandleIndexFromFace <integer>faceIndex <integer>ithVertex

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.

<integer>getInteriorIndexFromFace <integer>faceIndex <integer>ithVertex

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

<integer>getVertexGeomIndexFromFace <integer>faceIndex <integer>ithVertex

This retrieves the index of a geometric vertex from a face. This 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.

<integer>getHandleGeomIndexFromFace <integer>faceIndex <integer>ithVertex

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.

<integer>getInteriorGeomIndexFromFace <integer>faceIndex <integer>ithVertex

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.

<void>setFaceVertex <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel

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

<void>setFaceHandle <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel

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.

<void>setFaceInterior <point3>pos <integer>faceIndex <integer>ithVertex <boolean>sel

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.

<void>setFaceVertexIndex <integer>faceIndex <integer>ithVertex <integer>vertexIndex

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

<void>setFaceHandleIndex <integer>faceIndex <integer>ithVertex <integer>vertexIndex

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.

<void>setFaceInteriorIndex <integer>faceIndex <integer>ithVertex <integer>vertexIndex

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.

 

<void>forceUpdate <boolean>update

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.

Note:

Normally, when the user changes the topology, Unwrap resets the mapping. If the forceUpdate is set to true then the mapping will not be reset, but you can't edit/see any mapping that makes sense. This flag is for advance users that want to lock a mapping and then set the topology back down for maximized viewport speed.

 

<void>getFaceSelectionFromStack()

Updates the Unwrap_UVW modifier to accept any face selection coming 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.

 

The following interface and methods have been added to Unwrap_UVW in 3ds Max 5

Interface: unwrap2

Methods:

<void>selectPolygonsUpdate <bitArray>selection <boolean>update

Selects the faces supplied by the bitArray. 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.

<void>selectFacesByNormal <point3>normal <float>threshold <boolean>update

Selects the faces whose face normals are within the given threshold relatively to the supplied normal. When update is given as true, updates the selection display.

<void>selectClusterByNormal <float>threshold <integer>faceIndexSeed <boolean>relative <boolean>update

Select a cluster based on the supplied threshold value starting with the faceIndexSeed face.

When relative is supplied as true, the threshold will be measured relatively to the neighbor face (and thus be able to propagate across the whole mesh if needed). When false, the threshold will be measured absolutely to the seed face.

When true is supplied for update, the selection will be updated in the viewports.

Flatten Map

<void>flattenMap <float>angleThreshold <point3 array>normalList <float>spacing <boolean>normalize <integer>layOutType <boolean>rotateClusters <boolean>fillHoles

Flattens the UVW coordinates based on the supplied parameters.

Flatten Mapping uses an angle threshold to define the clusters and the clusters will always be contiguous faces. This type of mapping will generate mapping that does not overlap so it is useful for baking textures and lighting.

angleThreshold - when building contiguous faces this the angle used to determine whether a face is part of that cluster. The larger this angle the larger the cluster will be, but you will get more distortion since the texture faces area will start deviating from there geometric face area.

normalList specifies an array of normal vectors defining clusters. The clusters will still be built using the angle threshold, but the supplied vectors will be used as starting directions for building the clusters. To use no vectors, an empty array #() can be supplied. The default UI Flatten feature uses a list of 6 vectors aligned to the world axes: #([1,0,0], [-1,0,0], [0,1,0], [0,-1,0], [0,0,1], [0,0,-1])

spacing determines how much space there is between the clusters.

normalize will normalize the complete flattened mapping from 0 to 1

layOutType defines the layout type. 0 - sort clusters from bottom to top and from left to right. 1 - sort clusters from left to right and from bottom to top. Default type of the Flatten feature in the UI is 0.

rotateClusters will rotate the clusters so they take the least area.

fillHoles will fill clusters with holes. It places smaller cluster in the gaps of larger clusters.

Flatten Map Options

<void>flattenMapDialog()

Open the Flatten dialog.

<void>flattenMapNoParams()

Execute the FlattenMap function using the current default.

<float>getFlattenAngle()

Returns the current default Flatten Angle threshold .

<void>setFlattenAngle <float>angle

Sets the current default Flatten Angle threshold .

<float>getFlattenSpacing()

Returns the current default Flatten Spacing value.

<void>setFlattenSpacing <float>spacing

Sets the current default Flatten Spacing value.

<boolean>getFlattenNormalize()

Returns the current default Flatten Normalize option state.

<void>setFlattenNormalize <boolean>normalize

Sets the current default Flatten Normalize option state.

<boolean>getFlattenRotate()

Returns the current default Flatten Rotate option state.

<void>setFlattenRotate <boolean>rotate

Sets the current default Flatten Rotate option state.

<boolean>getFlattenFillHoles()

Returns the current default Flatten Fill Holes option state.

<void>setFlattenFillHoles <boolean>fillHoles

Sets the current default Flatten Fill Holes option state.

<boolean>getPreventFlattening()

Returns the state of the Prevent Reflattening checkbox in the modifier’s UI.

<void>setPreventFlattening <boolean>preventFlattening

Set the state of the Prevent Reflattening checkbox in the modifier’s UI.

Normal Map

<void>normalMap <point3 array>normalList <float>spacing <boolean>normalize <integer>layOutType <boolean>rotateClusters <boolean>alignWidth

Normal-map the UVW coordinates. For each normal vector in the normalList, a cluster of the faces with the corresponding normal vector will be created.

Normal Mapping is mapping based solely are the normals provided. This is identical to box mapping except you customize what normals you want to project on.

Parameters in the Normal Mapping dialog are:

spacing determines how much space there is between the clusters.

layOutType determines which of the 6 mapping types to use: Back/Front, Left/Right, Top/Bottom, Box Mapping No Top, Box Mapping, Diamond mapping

normalize will normalize the cluster from 0 to 1

rotateClusters will rotate the clusters so they take the least area.

alignWidth will sort the clusters by there width otherwise it will use their heights.

 

<void>normalMapNoParams()

Executes the NormalMap function using the current defaults.

<void>normalMapDialog()

Opens the NormalMap dialog.

Unfold Map

<void>unfoldMap <integer>unfoldMethod

Unfold the UVW coordinates using the specified unfold method:

0 - Walk to farthest face

1 - Walk to closest face

These determine the order of which face gets unfolded. Under almost all conditions you want to walk to the closest face.

This is an actual unfolding algorithm. It guarantees that all texture faces will have the exact same proportions as their geometric equivalents, but you may get faces that overlap. This type of mapping is only good on meshes that are very regular things like cylinders etc.

<void>unfoldMapNoParams()

Executes the unfoldMap function using the current defaults.

<void>unfoldMapDialog()

Opens the UnfoldMap dialog.

<void>setSeedFace()

Takes the current selection and sets it as the seed face when unfolding. The seed face is where the unfolding starts from.

Hide Polygons in Viewports

<void>hideSelectedPolygons()

Hides the selected mesh polygons in the viewports.

<void>unhideAllPolygons()

Unhides the mesh polygons in the viewports.

<point3>getNormal <integer>faceIndex

Returns the normal of the indexed face.

Copy and Paste Selection

<void>copy()

Copy the current selection to the clipboard.

Copy/Paste allows you to copy a texture face/faces from one part or mesh to another or to a new mesh. These functions are extremely topology dependant so if you copy faces onto faces that have a different topology or face order, you will get unpredictable results.

<void>paste <boolean>rotate

Paste the copied values. Paste take one parameter which determines every time you paste to the same face whether the texture vertices are reoriented. For instance, if you paste a quad onto a another quad there are actually 4 possible ways you can paste it onto it. If rotate is on, every time you paste it will go onto the next variation.

<void>pasteInstance()

Paste Instance forces the faces that are being pasted to use the vertices that the copy buffer use (NOTE you cannot paste instance across objects). This is similar to doing a regular paste and then selecting all the overlapping vertices and doing a weld. There is no rotate option with this method. As noted above Pasting faces that have a different topology or face order will result in unpredictable results.

Stitch

<void>stitchVerts <boolean>align <float>bias

Stitch the selected vertices using the specified bias. If align is supplied as true, the vertices will be aligned.

Stitching allows you to find all the texture vertices that are assigned to the same geometric vertex and bring them all to the same spot and weld them together. This allows you take faces that are geometrically contiguous, but not texture face contiguous and line them up.

The parameters are:

align - if checked and the edges to be stitched are on separate clusters it will try to align the clusters and then stitch the vertices.

bias determines which direction the vertices will move (to or from the source). At a Bias of 0.0 the vertices will move to the source and 1.0 they will move to the target. Stitching will respect the soft selection.

<void>stitchVertsNoParams()

Execute the Stitch function using the current defaults.

<void>stitchVertsDialog()

Open the Stitch dialog.

Map Tiling

<boolean>getTileMap()

Returns true if the map is tiled, false otherwise.

<void>setTileMap <boolean>tile

Enable/Disable the map tiling.

<integer>getTileMapLimit()

Returns the map tiling limit. Corresponds to the Tile Limit value found in the Options panel and Advanced Options dialog. The value defines how many times to repeat the map outside of the original map area.

<void>setTileMapLimit <integer>limit

Sets the map tiling limit. Corresponds to the Tile Limit value found in the Options panel and Advanced Options dialog. The value defines how many times to repeat the map outside of the original map area.

<float>getTileMapBrightness()

Returns the Brightens of the tiled map outside of the original map area.

<void>setTileMapBrightness <float>contrast

Sets the Brightens of the tiled map outside of the original map area.

Show Map

<boolean>getShowMap()

Returns the show map button state.

<void>setShowMap <boolean>showMap

Sets the show map button state.

Limit Soft Selection

<boolean>getLimitSoftSel()

Returns the state of the Edge Distance checkbox in the Soft Selection group.

<void>setLimitSoftSel <boolean>limit

When true is supplied as limit, the Edge Distance will be used.

<integer>getLimitSoftSelRange()

Returns the Edge Distance value set in the Soft Selection group.

<void>setLimitSoftSelRange <integer>range

Sets the Edge Distance value used to limit the Soft Selection.

Vertex Weight

<float>getVertexWeight <integer>index

Returns the Vertex Weight of the specified vertex.

<void>setVertexWeight <integer>index <float>weight

Sets the Vertex Weight of the specified vertex to the supplied value.

<boolean>isWeightModified <integer>index

Returns true if the specified vertex has been affected by soft selection, false otherwise.

<void>modifyWeight <integer>index <boolean>modify

Sets whether the specified vertex should be modified by soft selection.

If a vertex is modified it ignores regular UI soft selection and the vertex soft selection weight is locked to it current state and can only be changed by the setVertexWeight method.

Select By Element

<boolean>getGeomSelectElementMode()

Returns the state of the Select By Element checkbox in the modifier’s UI.

<void>setGeomSelectElementMode <boolean>mode

Sets the state of the Select By Element checkbox in the modifier’s UI.

<void>selectElement()

Select the Element using the current selection.

Planar Threshold

<boolean>getGeomPlanarThresholdMode()

Returns true if the Geom. Planar Threshold mode is checked, false otherwise. Corresponds to the checkbox in front of the Planar Angle value in the modifier’s UI.

<void>setGeomPlanarThresholdMode <boolean>mode

Sets the Geom. Planar Threshold mode state. Corresponds to the checkbox in front of the Planar Angle value in the modifier’s UI.

 

<float>getGeomPlanarThreshold()

Returns the Geom. Planar Threshold value, corresponds to the Planar Angle value in the modifier’s UI.

<void>setGeomPlanarThreshold <float>angle

Sets the Geom. Planar Threshold value, corresponds to the Planar Angle value in the modifier’s UI.

Editor Window Size

<integer>getWindowX()

Returns the Editor’s upper left corner’s X coordinate relatively to the upper left corner of the Windows desktop.

<integer>getWindowY()

Returns the Editor’s upper left corner’s Y coordinate relatively to the upper left corner of the Windows desktop.

<integer>getWindowW()

Returns the Editor’s window width in pixels.

<integer>getWindowH()

Returns the Editor’s window height in pixels.

Ignore Backface Culling

<boolean>getIgnoreBackFaceCull()

Returns the state of the Ignore Backfacing checkbox in the modifier’s UI.

<void>setIgnoreBackFaceCull <boolean>ignoreBackFaceCull

Sets the state of the Ignore Backfacing checkbox in the modifier’s UI.

Old Selection Method

<boolean>getOldSelMethod()

Returns false when the new selection method is used, false when the old selection method is used. In the old selection mode, drag selection always uses back faces and single pick mode ignore back faces.

<void>setOldSelMethod <boolean>oldSelMethod

Sets the selection method. False means use the new selection method, true means use the old selection method.

This method lets you set the system back to the old selection method where drag selection always uses back faces and single pick mode ignore back faces. This will override the Ignore Back Faces mode.

Select By Material ID

<void>selectByMatID <integer>matID

Selects the faces with the specified Material ID. Corresponds to the Select MatID button in the modifier’s UI.

<void>selectBySG <integer>sg

Selects the faces with the specified Smoothing Group. Corresponds to the Select SG button in the modifier’s UI.

TV Element Mode

<boolean>getTVElementMode()

Returns the state of the Select Element checkbox in the Selection Mode group of the Editor’s panel.

<void>setTVElementMode <boolean>mode

Sets the state of the Select Element checkbox in the Selection Mode group of the Editor’s panel.

Expand Face Selection

<void>expandGeomFaceSelection()

Expands the face selection in the viewport.

<void>contractGeomFaceSelection()

Contracts the face selection in the viewport.

Always Edit Mode

<boolean>getAlwaysEdit()

Returns the state of the "Always Bring Up the Edit Window" option found in the Options menu item. When true, the Editor will auto-open each time the object is selected.

<void>setAlwaysEdit <boolean>always

Sets the state of the "Always Bring Up the Edit Window" option found in the Options menu item. When set to true, the Editor will auto-open each time the object is selected.

Show Vertex Connections

<boolean>getShowVertexConnections()

Returns the state of the "Show Vertex Connections" option found in the Options menu item. Vertex Connections are TV vertices that share the same geometric vertices.

<void>setShowVertexConnections <boolean>show

Sets the state of the "Show Vertex Connections" option found in the Options menu item. Vertex Connections are TV vertices that share the same geometric vertices.

<void>toggleVertexConnection()

Toggles the Vertex Connections display.

Filter Selected

<boolean>getFilterSelected()

Returns the state of the "Filter Selected Faces" checkbutton in the Editor’s status bar.

<void>setFilterSelected <boolean>filter

Sets the state of the "Filter Selected Faces" checkbutton in the Editor’s status bar.

Snap State

<boolean>getSnap()

Returns the state of the "Pixel Snap" checkbutton in the Editor’s status bar when the flyout is set to Pixel Snap. Always returns false when Grid Snap is set in the flyout.

<void>setSnap <boolean>snap

Sets the state of the "Pixel Snap" checkbutton in the Editor’s status bar. Sets the flyout to Pixel Snap if necessary.

Lock State

<boolean>getLock()

Returns the state of the selection Lock.

<void>setLock <boolean>lock

Sets the state of the selection Lock.

Pack

<void>pack <integer>method <float>spacing <boolean>normalize <boolean>rotate <boolean>fillholes

Lets you pack the texture vertex elements so that they fit within a square space.

method - 0 is a linear packing algorithm fast but not that efficient, 1 is a recursive algorithm slower but more efficient.

spacing - the gap between cluster in percentage of the edge distance of the square

normalize - determines whether the clusters will be fit to 0 to 1 space.

rotate - determines whether a cluster will be rotated so it takes up less space.

fillholes - determines whether smaller clusters will be put in the holes of the larger cluster.

<void>packNoParams()

Executes the Pack function using the current default settings.

<void>packDialog()

Opens the Pack UVs dialog.

TV SubObject Mode

<integer>getTVSubObjectMode()

Returns the sub-object mode index.

1 - Vertex

2 - Edge

3 - Face

<void>setTVSubObjectMode <integer>mode

Sets the sub-object mode:

1 - Vertex

2 - Edge

3 - Face

Selected Faces

<bitArray>getSelectedFaces()

Returns the face selection from the Editor as bitarray

<void>selectFaces <bitArray>selection

Sets the face selection in the Editor using the supplied bitArray.

<boolean>isFaceSelected <integer>index

Returns true if the specified indexed face is selected, false otherwise.

Fill Mode

<integer>getFillMode()

Returns the polygon fill mode:

1 - No Fill

2 - Solid Fill

3 - Cross Hatch Diagonal Downward

4 - Cross Hatch Horizontal/Vertical

5 - Cross Hatch Diagonal

6 - Cross Hatch Diagonal Upward

7 - Cross Hatch Horizontal

8 - Cross Hatch Vertical

 

<void>setFillMode <integer>mode

Sets the polygon fill mode.

1 - No Fill

2 - Solid Fill

3 - Cross Hatch Diagonal Downward

4 - Cross Hatch Horizontal/Vertical

5 - Cross Hatch Diagonal

6 - Cross Hatch Diagonal Upward

7 - Cross Hatch Horizontal

8 - Cross Hatch Vertical

Transform Selected

<void>moveSelected <point3>offset

Moves the selected sub-objects at the specified offset.

<void>rotateSelectedCenter <float>angle

Rotates the selected sub-objects at the specified angle using the selection center.

<void>rotateSelected <float>angle <point3>axis

Moves the selected sub-objects at the specified offset about the specified axis.

<void>scaleSelectedCenter <float>scale <integer>dir

Scales the selected sub-objects by the specified amount using the selection center. The dir integer defines the direction of scaling as follows:

0 - scale both X and Y

1 - scale X only

2 - scale Y only

<void>ScaleSelected <float>scale <integer>dir <point3>axis

Scales the selected sub-objects by the specified amount using the specified axis. The dir integer defines the scaling mode as follows:

0 - scale both X and Y

1 - scale X only

2 - scale Y only

Selected Edges

<bitArray>getSelectedEdges()

Returns the edge selection from the Editor as bitarray.

<void>selectEdges <bitArray>selection

Set the edge selection in the Editor using the supplied bitarray.

<boolean>isEdgeSelected <integer>index

Returns true if the indexed edge is selected, false otherwise.

Open Edges Display

<boolean>getDisplayOpenEdges()

Returns the state of the Display Open Edges option.

<void>setDisplayOpenEdges <boolean>displayOpenEdges

Sets the state of the Display Open Edges option.

<point3>getOpenEdgeColor()

Returns the color used to display Open Edges.

<void>setOpenEdgeColor <point3>color

Sets the color used to display Open Edges.

<boolean>getOpenEdgeMode()

Returns the OpenEdge Mode.

<void>setOpenEdgeMode <boolean>uvOpenMode

Sets the OpenEdge Mode.

<void>openEdgeSelect()

Selects Open Edges. Select any number of edges and call this method to select all open edges which share texture vertices with the original selection.

UV Edge Mode

<boolean>getUVEdgeMode()

Returns the UV Edge Mode.

<void>setUVEdgeMode <boolean>uvEdgeMode

Sets the UV Edge Mode.

<void>uvEdgeSelect()

Selects UV Edge Loops. Select any number of edges and call this method to select all edges that build an edge loop with the original selection.

Convert Selection

<void>vertToEdgeSelect()

Convert the Vertex Selection to Edge Selection.

<void>vertToFaceSelect()

Convert the Vertex Selection to Face Selection.

<void>edgeToVertSelect()

Convert the Edge Selection to Vertex Selection.

<void>edgeToFaceSelect()

Convert the Edge Selection to Face Selection.

<void>faceToVertSelect()

Convert the Face Selection to Vertex Selection.

<void>faceToEdgeSelect()

Convert the Face Selection to Edge Selection.

Hidden Edges Display

<boolean>getDisplayHiddenEdges()

Returns the state of the Display Hidden Edges option.

<void>setDisplayHiddenEdges <boolean>displayHiddenEdges

Sets the state of the Display Hidden Edges option.

Handle Color

<point3>getHandleColor()

Returns the handle color.

<void>setHandleColor <point3>color

Sets the handle color.

Free Form Mode

<boolean>getFreeFormMode()

Returns true if in FreeForm Mode, false otherwise.

In this mode, you select anywhere inside the bounding rectangle to move the selection. You select the corners to scale the selection, and select the edge centers to rotate the selection. You can also move the center cross which is your rotation pivot point.

<void>setFreeFormMode <boolean>freeFormMode

Enable / Disable FreeForm Mode.

In this mode, you select anywhere inside the bounding rectangle to move the selection. You select the corners to scale the selection, and select the edge centers to rotate the selection. You can also move the center cross which is your rotation pivot point.

<point3>getFreeFormColor()

Returns the FreeForm color.

<void>setFreeFormColor <point3>color

Sets the FreeForm gizmo color.

Scale Selected XY

<void>scaleSelectedXY <float>scaleX <float>scaleY <point3>axis

Scales the current selection non-uniformly using the separate X and Y scale values. Uses the axis Point3 value as center.

Pivot

<void>snapPivot <integer>pos

This lets you quickly snap the free form gizmo pivot to the bounding rectangle.

1 is the center

2 is the lower left of the selection

3 is the lower center of the selection

4 is the lower right of the selection

5 is the right center of the selection

6 is the upper right of the selection

7 is the upper center of the selection

8 is the upper left of the selection

9 is the left center of the selection

<point3>getPivotOffset()

Returns the pivot offset of the free form gizmo. This is an offset from the center of the selection.

<void>setPivotOffset <point3>offset

Sets the free from gizmo’s Pivot offset.

<point3>getSelCenter()

Returns the Selection Center so you can compute the pivot offset from a world uv position.

<boolean>getResetPivotOnSelection()

Returns the Reset Pivot on selection state. When true, the pivot will reset itself to the center of the selection.

<void>setResetPivotOnSelection <boolean>reset

Sets the Reset Pivot on selection option. When true, the pivot will reset itself to the center of the selection.

Sketch

<void>sketch <int array>indexList <point3 array>positionList

Sketches UV coordinates using the supplied index list array and the position list array.

<void>sketchNoParams()

Executes the Sketch function using the current defaults.

<void>sketchDialog()

Opens the Sketch Vertices dialog.

<void>sketchReverse()

Reverses the order of the select vertices that are being used for sketch when you use the Use Current Selection option.

Hit Size

<integer>getHitSize()

Returns the Single Click Hit Size value found in the Advanced Options dialog.

<void>setHitSize <integer>size

Sets the Single Click Hit Size value found in the Advanced Options dialog.

Polygon Mode

<boolean>getPolygonMode()

Returns the Polygon mode.

<void>setPolygonMode <boolean>mode

Sets the Polygon mode.

<void>polygonSelect()

Returns the Polygon mode.

Selection Inside Gizmo

<boolean>getAllowSelectionInsideGizmo()

Returns the state of the allow selecting inside the gizmo option.

<void>setAllowSelectionInsideGizmo <boolean>select

Allow / Disallow selecting inside the gizmo.

Load/Save Default Settings

<void>saveCurrentSettingsAsDefault()

Saves the current settings as the defaults.

The method takes the current state of Unwrap UVW and save it to the plugcfg directory into a file called unwrapUVW.ini. The next time the user creates an Unwrap UVW modifier this ini file will be used to set the defaults.

<void>loadDefault()

Loads the unwrapUVW.ini defaults into the current Unwrap UVW modifier.

Show Shared

<boolean>getShowShared()

Returns whether shared sub objects are displayed. Shared sub objects are texture vertices or edges that share the same geometric vertex or edge.

<void>setShowShared <boolean>select

Sets whether shared sub objects are displayed. Shared sub objects are texture vertices or edges that share the same geometric vertex or edge.

<point3>getSharedColor()

Returns the color that will be used to show shared sub objects.

<void>setSharedColor <point3>color

Sets the color that will be used to show shared sub objects.

Show Icon

<void>showIcon <integer>index <boolean>show

Lets you turn on/off icons in the Unwrap UVW Edit dialog

The icons are as follows:
1 - Move Mode
2 - Rotate Mode
3 - Scale Mode
4 - Transform Mode
5 - Mirror Tool
6 - Expand Selection
7 - Contract Selection
8 - Soft Selection Falloff
9 - Soft Selection Space
10 - Soft Selection Strength
11 - Break
12 - Target Weld
13 - Weld Selected
14 - Update Map
15 - Show Map
16 - UV/VW/UW space
17 - Properties Dialog
18 - Map Drop List
19 - U Spinner
20 - V Spinner
21 - W Spinner
22 - Lock Sub Object
23 - Hide/Show
24 - Freeze/Thaw
25 - Filter Selected
26 - Mat Ids
27 - Pan Mode
28 - Zoom Mode
29 - Zoom Region Mode
30 - Fit Command
31 - Snap

Synchronize Selection

<boolean>getSyncSelectionMode()

Returns the Sync. to Viewport mode.

<void>setSyncSelectionMode <boolean>sync

Sets the Sync. to Viewport mode.

<void>syncTVSelection()

Synchronizes the selection in the Editor to reflect the viewport selection.

<void>syncGeomSelection()

Synchronizes the face selection in the viewport to reflect the Editor’s selection.

Background Color

<point3>getBackgroundColor()

Returns the Background color.

<void>setBackgroundColor <point3>color

Sets the Background color.

<void>updateMenuBar()

Forces an update of the menu bar.

Tile Blending

<boolean>getBrightnessAffectsCenterTile()

Returns the state of the "Affect Center Tile" option in the Display Preferences of the Advanced Options dialog.

<void>setBrightnessAffectsCenterTile <boolean>bright

Sets the state of the "Affect Center Tile" option in the Display Preferences of the Advanced Options dialog. When set to true, the brightness value affects the center tile.

<boolean>getBlendTileToBackground()

Returns the state of the "Blend Tile To Background" option in the Display Preferences of the Advanced Options dialog. When true, the brightness value affects the center tile.

<void>setBlendTileToBackground <boolean>blend

Sets the state of the "Blend Tile To Background" option in the Display Preferences of the Advanced Options dialog.

When set to true, the tiled images are blended to the background color or black

Paint Selection

<boolean>getPaintSelectMode()

Returns the PaintSelect Mode.

When set to true, the tiled images are blended to the background color or black

<void>setPaintSelectMode <boolean>paint

Sets the PaintSelect Mode.

<integer>getPaintSelectSize()

Returns the size of the paint select brush. Will be clamped between 1 and 15.

<void>setPaintSelectSize <integer>size

Sets the size of the PaintSelect brush. Will be clamped between 1 and 15.

<void>paintSelectIncSize()

Increments the PaintSelect brush size by 1.

<void>paintSelectDecSize()

Decrements the PaintSelect brush size by 1.

Tick Size

<integer>getTickSize()

Returns the selected vertex tick size.

<void>setTickSize <integer>size

Sets the selected vertex tick size.

Grid

<float>getGridSize()

Returns the Grid Size.

<void>setGridSize <float>size

Sets the Grid Size.

<boolean>getGridSnap()

Returns the state of the Grid Snap checkbutton. Always returns false if the Snap flyout is in Pixel Snap mode.

<void>setGridSnap <boolean>snap

Sets the state of the Grid Snap checkbutton. Changes the flyout to Grid Snap if necessary.

<boolean>getGridVisible()

Returns the visible state of the Grid.

<void>setGridVisible <boolean>visible

Sets the visible state of the Grid.

<point3>getGridColor()

Returns the Grid color.

<void>setGridColor <point3>color

Sets the Grid color.

<float>getGridStr()

Returns the strength of the grid snap. At a strength of 1 the snap system has complete control and a vertex will always snap to a grid intersection, at a strength of 0 there will be no snapping.

<void>setGridStr <float>str

Sets the strength of the grid snap. At a strength of 1 the snap system has complete control and a vertex will always snap to a grid intersection, at a strength of 0 there will be no snapping.

Auto-Background

<boolean>getAutoBackground()

Returns the AutoBackground option’s state.

<void>setAutoBackground <boolean>enable

Sets the AutoBackground option’s state.

Enable Soft-Selection

<boolean>getEnableSoftSelection()

Returns the state of the Soft Selection On checkbox.

<void>setEnableSoftSelection <boolean>enable

Sets the state of the Soft Selection On checkbox.

Apply To Whole Object

<boolean>getApplyToWholeObject()

Gets the state of the Apply to whole object mode. When true, the Unwrap will ignore the selection set being passed to it.

<void>setApplyToWholeObject <boolean>whole

Sets the state of the Apply to whole object mode. When set to true, it will force Unwrap to ignore the selection set being passed to it. It has to be set before the modifier is applied to the object.

Vertex Position Extended

<void>setVertexPosition2 <time>time <integer>index <point3>pos <boolean>hold <boolean>update

An extended version of the setVertexPosition method with control over Holding and Updating.

Relax

<void>relax <integer>iterations <float>strength <boolean>lockEdges <boolean>matchArea

Performs a Relax.

Note:

In 3ds Max 6, you should consider using the Relax2() method and related methods described below.

<void>fitRelax <integer>iterations <float>strength

Performs a Fit Relax.

Debug Level (For Developers)

<void>setDebugLevel <integer>level

Development debugging level. Not exposed to the UI. Level 0 means no debug info, the higher the value the more info you will see in your script window.

 

The following interface is available in 3ds Max 6 and higher:

 

Interface: unwrap3

Methods:

<void>SetAutoBackGround <boolean>autoBackground

There is a new auto background option which, when set to True, will tie the current background to the current Mat. Filter ID. When you change the Mat. Filter ID, the background will automatically change to a map that uses that material id.

<boolean>GetAutoBackGround()

Returns the state of the Auto Background option (see above)

<float>getRelaxAmount()

Returns the relax amount

<void>setRelaxAmount <float>amount

Sets the relax amount to the spacified value

<integer>getRelaxIteration()

Returns the relax iterations count

<void>setRelaxIteration <integer>amount

Sets the relax iterations count to the specified value.

<boolean>getRelaxBoundary()

Get the Relax Boundary Points status. When true, the boundary points will remain fixed. Returns the state of the "Keep Boundary Points Fixed" checkbox in the Relax dialog.

<void>setRelaxBoundary <boolean>boundary

Set the Relax Boundary Points status. When set to true, the boundary points will remain fixed. Affects the state of the "Keep Boundary Points Fixed" checkbox in the Relax dialog.

<boolean>getRelaxSaddle()

Get Relax saddle status. Returns the state of the "Save Outer Corners" checkbox in the Relax dialog.

<void>setRelaxSaddle <boolean>saddle

Set Relax saddle status. Affects the state of the "Save Outer Corners" checkbox in the Relax dialog.

<void>relax2()

Performs the Relax operation. Same as pressing the Apply button in the Relax Dialog.

<void>relax2dialog()

Opens the Relax Dialog.

The following interface is available in 3ds Max 7:

 

Interface: unwrap4

Methods:

<boolean>getThickOpenEdges()

Returns true if Thick Open Edges display in the Unwrap_UVW Editor is enabled, false otherwise.

<void>setThickOpenEdges <boolean>thick

Enables Thick Open Edges display in the Unwrap_UVW Editor.when the parameter is true, disables Thick Open Edges display when false.

<boolean>getViewportOpenEdges()

Returns true if Open Edge display in the viewports is enabled, false otherwise.

<void>setViewportOpenEdges <boolean>show

When the supplied parameter is true, enables Open Edge display in the viewports. When the supplied parameter is false, disables Open Edge display in the viewports.

<void>selectInvertedFaces()

Selects the inverted faces.

<boolean>getRelativeTypeIn()

Returns true when the UVW coordinates Type-In spinners are set to Relative mode, false when in Absolute mode.

<void>setRelativeTypeIn <boolean>relative

When the parameter is true, sets the UVW coordinates Type-In spinners to Relative mode. When the supplied parameter is false, sets the Type-In to Absolute mode.

<void>addMap <texturemap>map

Adds the supplied texture map to the Maps drop-down list of the Unwrap_UVW Editor.

<void>flattenMapByMatID <float>angleThreshold <float>spacing <boolean>normalize <integer>layOutType <boolean>rotateClusters <boolean>fillHoles

Performs flatten by material ID.

<void>getArea <bitArray>faceSelection <&float>x <&float>y <&float>width <&float>height <&float>areaUVW <&float>areaGeom

x is Out parameter

y is Out parameter

width is Out parameter

height is Out parameter

areaUVW is Out parameter

areaGeom is Out parameter

Returns the geometry and uvw area, x, y, width and height of the supplied face selection.

<boolean>getRotationsRespectAspect()

Returns true if the rotations respect the aspect, false otherwise.

<void>setRotationsRespectAspect <boolean>respect

Sets whether rotations will respect the aspect or not.

<void>setMax5Flatten <boolean>like5

Sets whether Flatten is using the 3ds Max 5 algorithm or the 3ds Max 7 algorithm.

 

The following interface is available in 3ds Max 8 and higher:

 

Interface: unwrap5

Methods:

Selection Parameters Rollout

<void>expandGeomEdgeSelection()

Expands the Edge Selection. Equivalent to pressing the [+] button while in Edge Sub-Object mode.

<void>contractGeomEdgeSelection()

Contracts the Edge Selection. Equivalent to pressing the [-] button while in Edge Sub-Object mode.

<void>expandGeomVertexSelection()

Expands the Vertex Selection. Equivalent to pressing the [+] button while in Vertex Sub-Object mode.

<void>contractGeomVertexSelection()

Contracts the Vertex Selection. Equivalent to pressing the [-] button while in Vertex Sub-Object mode.

 

<void>geomEdgeLoopSelection()

Edge Loop Selection. Equivalent to pressing the Loop button in the Selection Parameters rollout.

<void>geomEdgeRingSelection()

Edge Ring Selection. Equivalent to pressing the Ring button in the Selection Parameters rollout.

 

<bitArray>getSelectedGeomVerts()

Returns a bitarray with bits set for the selected geometry vertices.

<void>setSelectedGeomVerts <bitArray>selection

Selects the geometry vertices using the bitarray argument.

 

<bitArray>getSelectedGeomEdges()

Returns a bitarray with bits set for the selected geometry edges.

<void>setSelectedGeomEdges <bitArray>selection

Selects the geometry edges using the bitarray argument.

 

Map Parameters Rollout

<boolean>getPeltMapMode()

Returns true if in Pelt mapping mode, false otherwise.

<void>setPeltMapMode <boolean>mode

Pass true as argument to enable the Pelt mapping mode, or false to disable.

<boolean>getPeltEditSeamsMode()

Returns true if in Edit Seams mode, false otherwise.

<void>setPeltEditSeamsMode <boolean>mode

Pass true as argument to enable the Edit Seams mode, or false to disable.

<bitArray>getPeltSelectedSeams()

Returns a bitarray of the selected seams for pelting.

<void>setPeltSelectedSeams <bitArray>selection

Sets the selected seams for pelting to the bitarray argument.

<boolean>getPeltPointToPointSeamsMode()

Returns true if in Point To Point Seams mode, false otherwise.

<void>setPeltPointToPointSeamsMode <boolean>mode

Pass true as argument to enable the Point To Point Seams mode, or false to disable.

<void>peltExpandSelectionToSeams()

Presses the Exp. Face Sel To Pelt Seams button in the Map Parameters rollout.

<boolean>getPeltAlwaysShowSeams()

Returns the state of the Always Show Pelt Seams checkbox.

<void>setPeltAlwaysShowSeams <boolean>show

Sets the state of the Always Show Pelt Seams checkbox.

<void>peltSeamToEdgeSel <boolean>replace

Converts the Pelt Seams to Edge Selection. If the argument is passed as true, any existing edge selection will be replaced.

<void>peltEdgeSelToSeam <boolean>replace

Converts the Edge Selection to Pelt Seams. If the argument is passed as true, any existing Pelt Seams will be replaced.

 

<void>mappingMode <integer>mode

Sets the mapping mode to the specified mode.
Possible argument values are:

0 - None

1 - Planar

2 - Cylindrical

3 - Spherical

4 - Box

5 - Pelt

6 and higher - Free

<void>mappingAlign <integer>axis

Aligns the mapping gizmo to the specified axis.
Possible argument values are:

0 - Align X

1 - Align Y

2 - Align Z

3 - Best Align

<void>mappingFit()

Fit the mapping gizmo to the selection. Corresponds to pressing the Fit button.

<void>mappingAlignToView()

Align the mapping gizmo to the view. Corresponds to pressing the Align To View button.

<void>mappingCenter()

Center the mapping gizmo to the selection. Corresponds to pressing the Center button.

<void>mappingReset()

Resets the Mapping gizmo. Corresponds to pressing the Reset button.

 

<void>setGizmoTM <matrix3>tm

Sets the transformation matrix of the mapping gizmo to the matrix3 argument.

<matrix3>getGizmoTM()

Returns the transformation matrix of the mapping gizmo.

<boolean>getNormalizeMap()

Returns the state of the Normalize Map checkbox.

<void>setNormalizeMap <boolean>normalize

Sets the state of the Normalize Map checkbox.

Pelt Map Parameters Dialog

<void>peltDialog()

Opens the Pelt Map Parameters dialog.

Pelt Map Parameters Dialog - Stretcher group of controls

<void>peltDialogResetStretcher()

Presses the Reset Stretcher button in the Pelt Map Parameters dialog.

<void>peltDialogSnapToSeams()

Presses the Snap To Seams button in the Pelt Map Parameters dialog.

<boolean>getPeltDialogStraightenMode()

Returns true if in Straighten mode, false otherwise.

<void>setPeltDialogStraightenMode <boolean>mode

Pass true as argument to enable the Straighten mode (check the Straighten Stretcher checkbutton in the Pelt map Parameters dialog), or false to disable.

<void>peltDialogStraighten <index>vert1 <index>vert2

Straigtens using the specified indexed vertices.

 

<void>peltDialogMirrorStretcher()

Presses the Mirror Stretcher button in the Pelt Map Parameters dialog.

<float>getPeltDialogMirrorAxis()

Returns the Mirror Axis.

<void>setPeltDialogMirrorAxis <float>axis

Sets the Mirror Axis.

Pelt Map Parameters Dialog - Springs group of controls

<float>getPeltDialogStretcherStrength()

Returns the Stretcher Pull Strength value.

<void>setPeltDialogStretcherStrength <float>strength

Sets the Stretcher Pull Strength value.

<float>getPeltDialogStiffness()

Returns the Stretcher Stiffness value.

<void>setPeltDialogStiffness <float>stiffness

Sets the Stretcher Stiffness value.

<float>getPeltDialogDampening()

Returns the Dampening value.

<void>setPeltDialogDampening <float>dampening

Sets the Dampening value.

<float>getPeltDialogDecay()

Returns the Decay value.

<void>setPeltDialogDecay <float>decay

Sets the Decay value.

<boolean>getPeltLockOpenEdges()

Returns the state of the Lock Open Edges checkbox.

<void>setPeltLockOpenEdges <boolean>lock

Sets the state of the Lock Open Edges checkbox.

Pelt Map Parameters Dialog - Select group of controls

<void>peltDialogSelectStretcher()

Presses the Select Stretcher button in the Pelt Map Parameters dialog.

<void>peltDialogSelectPelt()

Presses the Select Pelt UVs button in the Pelt Map Parameters dialog.

Pelt Map Parameters Dialog - Simulation group of controls

<integer>getPeltDialogFrames()

Returns the number of Iterations of the Pelt simulation in frames.

<void>setPeltDialogFrames <integer>frames

Sets the Iterations of the Pelt simulation in frames.

<integer>getPeltDialogSamples()

Returns the number of Samples for the Pelt simulation.

<void>setPeltDialogSamples <integer>samples

Sets the number of Samples for the Pelt simulation.

 

<void>peltDialogRelaxLight()

Performs light relaxing. Corresponds to pressing the Relax(Light) button in the Pelt Map Parameters Dialog.

<void>peltDialogRelaxHeavy()

Performs heavy relaxing. Corresponds to pressing the Relax(Heavy) button in the Pelt Map Parameters Dialog.

<void>peltDialogRun()

Runs the Pelt simulation. Corresponds to pressing the Sumulate Pelt Pulling button.

Relax By Spring Tool

<void>relaxBySpringDialog()

Opens the Relax By Spring Tool dialog.

<integer>getRelaxBySpringIteration()

Returns the Iteration value.

<void>setRelaxBySpringIteration <integer>iteration

Sets the Iteration value.

 

<float>getRelaxBySpringStretch()

Returns the Stretch value.

<void>setRelaxBySpringStretch <float>stretch

Sets the Stretch value.

 

<boolean>getRelaxBySpringUseOnlyVEdges()

Returns the state of the Lock Bondaries checkbox.

<void>setRelaxBySpringUseOnlyVEdges <boolean>useOnlyVEdges

Sets the state of the Lock Bondaries checkbox.

<void>relaxBySpring <integer>frames <float>stretch <boolean>useOnlyVEdges

Performs the relax by spring without opening the dialog. The arguments correspond to the Iterations value, Stretch value and Lock Boundaries checkbox state.

Relax Tool

<void>relaxByFaceAngle <integer>iterations <float>stretch <float>strength <boolean>lockBoundaries

Performs a Relax By Face Angles operation without opening the Relax Tool dialog. The arguments correspond to the Iterations value, Stretch value, Amount value and Keep Boundary Points Fixed checkbox state found in the Relax Tool>Relax By Face Angles mode.

<void>relaxByEdgeAngle <integer>iterations <float>stretch <float>strength <boolean>lockBoundaries

Performs a Relax By Edge Angles operation without opening the Relax Tool dialog. The arguments correspond to the Iterations value, Stretch value, Amount value and Keep Boundary Points Fixed checkbox state found in the Relax Tool>Relax By Edge Angles mode.

Render UVW Template Dialog

<void>renderUVDialog()

Opens the Render UVW Template dialog.

<void>renderUV <filename>fileName

Renders a UVW Template to the specified file name using the current Render UVW Template dialog settings. See Unwrap_UVW Modifier Properties for available settings.

Unwrap Editor Window

<void>setWindowXOffset <integer>offset

Sets the horizontal window offset.

<void>setWindowYOffset <integer>offset

Sets the vertical window offset.

<void>fitSelectedElement()

Fits the selected element to the window.

<boolean>getShowSubObjectCounter()

Returns the state of the show sub-object counter option. When set to true, the count of the current sub-object selection will be displayed in the upper left corner of the Edit UVWs window.

<void>setShowSubObjectCounter <boolean>show

Sets the state of the show sub-object counter option. When set to true, the count of the current sub-object selection will be displayed in the upper left corner of the Edit UVWs window.

<boolean>getShowEdgeDistortion()

Returns the state of the Show Edge Distortion option in the Display menu of the Edit UVWs dialog.

<void>setShowEdgeDistortion <boolean>show

Sets the state of the Show Edge Distortion option in the Display menu of the Edit UVWs dialog.

<float>getEdgeDistortionScale()

Returns the Edge Distortion Scale value.

<void>setEdgeDistortionScale <float>scale

Sets the Edge Distortion Scale value.

<void>selectOverlappedFaces()

Selects overlapped faces. Corresponds to the Select>Select Overlapped Faces option in the Edit UVWs dialog menu bar.

See also

Modifier Common Properties, Operators, and Methods

MAXWrapper Common Properties, Operators, and Methods

Value Common Properties, Operators, and Methods