MAXScript Language Reference > 3ds Max Objects > Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper > Modifier and SpacewarpModifier Types > Modifiers > UVW Modifiers > Unwrap_UVW : Modifier >

# Unwrap_UVW Modifier - Edit UVWs Floater

| Unwrap_UVW Modifier - Main Topic | Modifier Classes - Quick Navigation

The following methods expose the Edit UVWs Floater and its various controls, tools and settings to MAXScript.

## Pan and Zoom

Methods:

    <void><Unwrap_UVW>.pan()

Presses the Pan button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.zoom()

Presses the Zoom button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.zoomRegion()

Presses the Zoom Region button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.fit()

Presses the Fit button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.fitSelected()

Presses the Fit Selected button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.UpdateView()

This forces the viewport and dialog to update.

Exposed via unwrap interface in 3ds Max 4 and higher.

## Load/Save Default Settings

Methods:

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <void><Unwrap_UVW>.loadDefault()

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

## Always Edit Mode

Methods:

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

## Editor Update Methods

    <void><Unwrap_UVW>.updateMenuBar()

Forces an update of the menu bar.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

## Editor Lock Aspect

Methods:

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.SetLockAspect <boolean>aspect

This sets the Lock Aspect Ratio value.

## Editor Window Size

Methods:

    <integer><Unwrap_UVW>.getWindowX()

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <integer><Unwrap_UVW>.getWindowY()

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <integer><Unwrap_UVW>.getWindowW()

Returns the Editor’s window width in pixels.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <integer><Unwrap_UVW>.getWindowH()

Returns the Editor’s window height in pixels.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <void><Unwrap_UVW>.setWindowXOffset <integer>offset

Sets the horizontal window offset.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

    <void><Unwrap_UVW>.setWindowYOffset <integer>offset

Sets the vertical window offset.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

## Other Editor Window Methods

Methods:

    <void><Unwrap_UVW>.fitSelectedElement()

Fits the selected element to the window.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

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

Exposed via unwrap5 interface in 3ds Max 8 and higher.

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

Exposed via unwrap5 interface in 3ds Max 8 and higher.

## Copy and Paste Selection

Methods:

    <void><Unwrap_UVW>.()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.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

## Lock/Hide/Freeze

Methods:

    <void><Unwrap_UVW>.lock()

Toggles the Lock Selected Vertices button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.hide()

Presses the Hide button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.unhide()

Presses the Unhide button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.freeze()

Presses the Freeze button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.unfreeze()

Presses the Unfreeze button in the edit floater.

Exposed via unwrap interface in 3ds Max4 and higher.

## Filter Selected

Methods:

    <boolean><Unwrap_UVW>.getFilterSelected()

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <void><Unwrap_UVW>.setFilterSelected <boolean>filter

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <void><Unwrap_UVW>.filterSelected()

Toggles the Filter Selected Faces button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

## Hidden Edges Display

Methods:

    <boolean><Unwrap_UVW>.getDisplayHiddenEdges()

Returns the state of the Display Hidden Edges option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <void><Unwrap_UVW>.setDisplayHiddenEdges <boolean>displayHiddenEdges

Sets the state of the Display Hidden Edges option.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

## Show Edge Distortion

Methods:

    <boolean><Unwrap_UVW>.getShowEdgeDistortion()

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

Exposed via unwrap5 interface in 3ds Max 8 and higher.

    <void><Unwrap_UVW>.setShowEdgeDistortion <boolean>show

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

Exposed via unwrap5 interface in 3ds Max 8 and higher.

    <float><Unwrap_UVW>.getEdgeDistortionScale()

Returns the Edge Distortion Scale value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

    <void><Unwrap_UVW>.setEdgeDistortionScale <float>scale

Sets the Edge Distortion Scale value.

Exposed via unwrap5 interface in 3ds Max 8 and higher.

## Show Vertex Connections

Methods:

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

    <void><Unwrap_UVW>.toggleVertexConnection()

Toggles the Vertex Connections display.

Exposed via unwrap2 interface in 3ds Max 5 and higher.

## Relative Type-In

Methods:

    <boolean><Unwrap_UVW>.getRelativeTypeIn()

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

Exposed via unwrap4 interface in 3ds Max 7 and higher.

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

Exposed via unwrap4 interface in 3ds Max 7 and higher.

## Material ID

Methods:

    <integer><Unwrap_UVW>.getMatID()

Returns the current material id index filter.

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.setMatID <integer>matid

Sets the material drop list to the index supplied.

Exposed via unwrap interface in 3ds Max 4 and higher .

    <integer><Unwrap_UVW>.numberMatIDs()

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

Exposed via unwrap interface in 3ds Max 4 and higher.

## Snap

Methods:

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

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

Exposed via unwrap2 interface in 3ds Max 5 and higher.

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

Exposed via unwrap interface in 3ds Max 4 and higher.

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.snap()

Presses the Snap button in the edit floater.

Exposed via unwrap interface in 3ds Max 4 and higher.

## Bitmap Options

Methods:

    <integer><Unwrap_UVW>.getRenderWidth()

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.setRenderWidth <integer>width

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <integer><Unwrap_UVW>.getRenderHeight()

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.setRenderHeight <integer>height

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <boolean><Unwrap_UVW>.getUseBitmapRes()

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

Exposed via unwrap interface in 3ds Max 4 and higher.

    <void><Unwrap_UVW>.setUseBitmapRes <boolean>useRes

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

Exposed via unwrap interface in 3ds Max 4 and higher.

## Custom Toolbars and Floaters

The custom toolbars and floaters are stored in a file called "UnwrapToolBar.ini" found in the current \plugcfg folder accessible through getDir #plugcfg . Note that you have to close the current 3ds Max session in order to make manual changes to this .ini file.

Properties:

     <Unwrap_UVW>.buttonpanel_height1 Integer default: 360 -- integer

Available in 3ds Max 2012 and higher.

     <Unwrap_UVW>.buttonpanel_height2 Integer default: 700 -- integer

Available in 3ds Max 2012 and higher.

     <Unwrap_UVW>.buttonpanel_visible BooleanClass default: false -- boolean

Available in 3ds Max 2012 and higher.

     <Unwrap_UVW>.buttonpanel_width Integer default: 360 -- integer

Available in 3ds Max 2012 and higher.

     <Unwrap_UVW>.floaters ArrayParameter default: #() -- string array

Available in 3ds Max 2012 and higher.

     <Unwrap_UVW>.floatersVisible ArrayParameter default: #() -- boolean array

Available in 3ds Max 2012 and higher.

    <Unwrap_UVW>.toolBarVisible BooleanClass default: false -- boolean

NEW in 3ds Max 2012: Get/set the visible state of the custom toolbars.

Methods:

    <void><Unwrap_UVW>.AddToolBar <integer>owner <string>name <integer>pos <integer>x <integer>y <integer>width <boolean>popup

Adds a new toolbar to the Edit UVWs Floater's UI.

Exposed via unwrap6 interface in 3ds Max 2012 and higher.

    <void><Unwrap_UVW>.ShowToolBar <boolean>visible

Exposed via unwrap6 interface in 3ds Max 2012 and higher.

    <void><Unwrap_UVW>.AddFloater <string>name

Adds a new Floater with the given name to the Edit UVWs UI. The floater will be a child of the Editor's floater - hiding / unhiding the Editor will hide or unhide the floater, too. The title of the Floater will be "Floater_<name>" where <name> is the string argument to the method.

There is no check to ensure a Floater with that name does not exist, so it is technically possible to add multiple Floaters with the same name. This is undesired since the .ShowFloater() method will only affect the first one created. Thus it is a good idea to call .DeleteFloater() with the same name argument before calling .addFloater() .

Exposed via unwrap6 interface in 3ds Max 2012 and higher.

    <void><Unwrap_UVW>.ShowFloater <string>name <boolean>vis

Shows the floater with the name specified by the first argument if the second argument is passed as true, hides it if the second argument is false.

If a Floater with the given name does not exist, does nothing.

If two Floaters with the given name exist, affects only the one created first.

Exposed via unwrap6 interface in 3ds Max 2012 and higher.

    <void><Unwrap_UVW>.DeleteFloater <string>name

Deletes the Floater with the given name.

If a Floater with the given name does not exist, does nothing.

If multiple Floaters with the same name have been created, it will delete the oldest one. Thus it is possible to call this method multiple times to delete all floaters with the same name.

Exposed via unwrap6 interface in 3ds Max 2012 and higher.