Unwrap_UVW : Modifier

Constructor

unwrap_UVW ...

Note: This class is not available in 3D Studio VIZ.

Properties

There are no additional properties for Unwrap_UVW.

Methods

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

PlanarMap()

Presses the Planar Map button in the rollup interface

Save()

Presses the Save button in the rollup interface

Load()

Presses the Load button in the rollup interface

Reset()

Presses the Reset button in the rollup interface

Edit()

Presses the Edit button in the rollup interface

SetMapChannel <channel>

Sets the Map Channel field in the rollup

Channel (integer) û The channel that you want to set to.

GetMapChannel()

Returns the Map Channel field value in the rollup

SetVC <VertexColor>

Sets the Vertex Color Channel radio button in the rollup on or off.

VertexColor (integer) û Turn the vertex color on/off.

GetVC()

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

SetProjectionType <Proj>

Proj (integer) û The type of mapping you want:

1 û X aligned

2 û Y aligned

3 û Z aligned

4 û normal aligned

GetProjectionType()

Returns the state of the mapping align radio buttons:

1 û X aligned

2 û Y aligned

3 û Z aligned

4 û normal aligned

Move()

Presses the Move button in the edit floater.

MoveH()

Presses the Move Horizontal button in the edit floater.

MoveV()

Presses the Move Vertical button in the edit floater.

Rotate()

Presses the Rotate button in the edit floater.

Scale()

Presses the Scale button in the edit floater.

ScaleH()

Presses the Scale Horizontal button in the edit floater.

ScaleV()

Presses the Scale Vertical button in the edit floater.

MirrorH()

Presses the Mirror Horizontal button in the edit floater.

MirrorV()

Presses the Mirror Vertical button in the edit floater.

ExpandSelection()

Presses the Expand Selection button in the edit floater.

ContractSelection()

Presses the Contract Selection button in the edit floater

SetFalloffType <falloff>

Sets the falloff type in the edit floater.

falloff (integer) û The falloff type:

1 û Linear falloff

2 û Sinual falloff

3 û Fast falloff

4 û Slow falloff

GetFalloffType()

Returns the falloff type in the edit floater:

1 û Linear falloff

2 û Sinual falloff

3 û Fast falloff

4 û Slow falloff

SetFalloffSpace <space>

Sets the falloff space in the edit floater.

space (integer) û 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.)

GetFalloffSpace()

Returns the falloff space in the edit floater.

SetFalloffDist <dist>

Sets the falloff distance in the edit floater.

dist (float) û The falloff distance.

GetFalloffDist()

Returns the falloff distance from the edit floater.

BreakSelected()

Presses the Break Selected button in the edit floater.

Weld()

Presses the Target Weld button in the edit floater.

WeldSelected()

Presses the Weld Selected button in the edit floater.

Updatemap()

Presses the Update Map button in the edit floater.

Displaymap <DisplayMap>

Toggles the Display Map button in the edit floater.

DisplayMap (boolean) û The state that you want to set the Display Map to.

IsMapDisplayed()

Returns the state of the Display Map button.

SetUVSpace <UVspace>

Sets the UV Space fly out in the edit floater.

UVSpace (integer) û The space that you want to view the texture vertices in:

1 û UV

2 û VW

3 û UW

GetUVSpace()

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

1 û UV

2 û VW

3 û UW

Options()

Presses the Options button in the edit floater.

Lock()

Toggles the Lock Selected Vertices button in the edit floater.

Hide()

Presses the Hide button in the edit floater.

Unhide()

Presses the Unhide button in the edit floater.

Freeze()

Presses the Freeze button in the edit floater.

Thaw()

Presses the Unfreeze button in the edit floater

FilterSelected()

Toggles the Filter Selected Faces button in the edit floater.

Pan()

Presses the Pan button in the edit floater.

Zoom()

Presses the Zoom button in the edit floater.

ZoomRegion()

Presses the Zoom Region button in the edit floater.

Fit()

Presses the Fit button in the edit floater.

FitSelected()

Presses the Fit Selected button in the edit floater.

Snap()

Presses the Snap button in the edit floater.

GetCurrentMap()

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

SetCurrentMap <map>

Changes the currently displayed map to the index provided.

map (integer) û The index of the map in the drop down list that you want to display.

NumberMaps()

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

GetLineColor()

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

SetLineColor <color>

Sets the line color of the texture vertices.

color (point3) û The color that you want to set the lines to.

GetSelColor()

Returns the texture vertices selection color as a Point3 value.

SetSelColor <color>

Sets the color of selected texture vertices.

color (point3) û The color that you want the selected vertice to be.

GetRenderWidth <dist>

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

SetRenderWidth <width>

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

width (integer) û The width in pixels for the bitmap.

GetRenderHeight()

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

SetRenderHeight <height>

Sets the width of the bitmap used to render to the display.

height (integer) - The height in pixels for the bitmap.

GetUseBitmapRes()

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

SetUseBitmapRes <useBitmapRes>

Sets the state of the Use Bitmap Resolution value. If it is false the bitmaps are rendered using the RenderWidth/Height values.

UseBitmapRes (boolean) - Toggle Use Bitmap Resolution.

GetWeldThresold()

Returns the weld threshold

SetWeldThreshold <threshold>

Sets the threshold values for welds.

threshold (float) û Threshold for welds.

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.

SetConstantUpdate <constantUpdates>

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.

GetShowSelectedVertices()

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

SetShowSelectedVertices <show>

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

show (boolean) û The state of Show Selected Vertices.

GetMidPixelSnape()

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.

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

snap (boolean) û The mid pixel snap state to be set.

GetMatID()

Returns the current material id index filter.

SetMatID <matid>

Sets the material drop list to the index supplied.

matid (integer) û The material id index to be set.

NumberMatIDs()

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

GetSelectedVerts()

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

SelectVerts <sel>

Selects texture vertices in the edit floater dialog.

sel (bitarray) û The selection set.

IsVertexSelected <index>

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

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

MoveSelectedVertices <offset>

Moves the selected texture vertices by the offset.

offset (point3) - The offset by which you want to move the vertices.

RotateSelectedVertices <angle>

Rotates the selected vertices around their center point.

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

RotateSelectedVertices <angle> <axis>

Rotates the selected vertices around a specific axis.

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

axis (point3) û The axis that you want to rotate the selected vertices by. This is in the space of the window.

ScaleSelectedVertices <scale> <dir>

Scales the selected points around their center.

scale (float) û The amount that you want to scale by.

dir (integer) û The direction you want to scale by:

0 û Scales uniform

1 û Scales in the x

2 û Scales in the y

ScaleSelectedVertices <scale> <dir> <axis>

Scales the selected points around their center around the axis.

scale (float) û The amount that you want to scale by.

dir (integer) û The direction:

0 û Scales uniform

1 û Scales in the x

2 û Scales in the y

axis (point3) û The axis that you want to rotate the selected vertices by. This is in the space of the window.

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

NumberVertices()

Returns the number of texture vertices.

MoveX <p>

This sets the selected vertices x values in absolute coordinates.

p (float) û The absolute position along the x axis.

MoveY <p>

This sets the selected vertices y values in absolute coordinates.

p (float) û The absolute position along the y axis.

MoveZ <p>

This sets the selected vertices xzvalues in absolute coordinates.

p (float) û The absolute position along the z axis.

GetSelectedPolygons()

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

SelectPolygons <sel>

Selects the polygons in the view ports.

sel (bitarray) û The polygons to select.

IsPolygonSelected <index>

Returns whether a polygon is selected or not.

index (integer) û Index of the polygon to check.

NumberPolygons()

Returns the number of polygons in the object.

DetachEdgeVerts()

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.

FlipH()

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

FlipV()

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

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.

SetLockAspect <aspect>

This sets the Lock Aspect Ratio value.

aspect (boolean) û Aspect lock toggle.

GetMapScale()

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

SetMapScale <scale>

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

scale (float) - The scaling factor for planar map.

GetSelectionFromFace()

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

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

update (boolean) û Determines whether the mapping is reset on topology change.

ZoomToGizmo <all>

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

all (boolean) û Determines whether the active or all the viewports get zoomed.

UpdateView()

This forces the viewport and dialog to update.

SetVertexPosition <t> <index> <pos>

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

t (timeValue) û The time at what you want to set the pos.

index (integer) û The index of the vertex.

pos (point3) û The position of the vertex in UVW space.

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.

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

index (integer) û The index of the vertex to mark as dead.

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

index (integer) û The index of the face that you are inspecting.

GetVertexIndexFromFace <faceindex> <ithVertexIndex>

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

FaceIndex (integer) û The index of the face that you want to inspect.

IthVertexIndex (integer) û The ith vertex of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.

GetHandleIndexFromFace <faceindex> <ithVertexIndex>

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.

FaceIndex (integer) û The index of the face that you want to inspect.

IthVertexIndex (integer) û 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.

GetInteriorIndexFromFace <faceindex> <ithVertexIndex>

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.

FaceIndex (integer) û The index of the face that you want to inspect.

IthVertexIndex (integer) û 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.

GetVertexGIndexFromFace <faceindex> <ithVertexIndex>

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

FaceIndex (integer) û The index of the face that you want to inspect.

IthVertexIndex (integer) û The ith vertex of that you want to retrieve. This value should range from 1 to the number of vertices that the face contains.

GetHandleGIndexFromFace <faceindex> <ithVertexIndex>

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

FaceIndex (integer) û The index of the face that you want to inspect.

IthVertexIndex (integer) û 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.

GetInteriorGIndexFromFace <faceindex> <ithVertexIndex>

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

FaceIndex (integer) û The index of the face that you want to inspect.

IthVertexIndex (integer) û 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.

SetFaceVertex <pos> <fIndex> <vIndex> <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.

pos (point3) - The position that you want to move a vertex to.

fIndex (integer) û The index of the face that you wish to work on.

vIndex (integer) û The ith vertex of the face that you want to change.

sel (boolean) û Whether or not to select the vertex after it is recreated.

SetFaceHandle <pos> <fIndex> <vIndex> <sel>

Identical to SetFaceVertex except works on patch handles.

pos (point3) - The position that you want to move a vertex to.

fIndex (integer) û The index of the face that you wish to work on.

vIndex (integer) û The ith vertex of the face that you want to change.

sel (boolean) û Whether or not to select the vertex after it is recreated.

SetFaceInterior <pos> <fIndex> <vIndex> <sel>

Identical to SetFaceVertex except works on patch interior handles.

pos (point3) - The position that you want to move a vertex to.

fIndex (integer) û The index of the face that you wish to work on.

vIndex (integer) û The ith vertex of the face that you want to change.

sel (boolean) û Whether or not to select the vertex after it is recreated.

SetFaceVertexIndex <fIndex> <ithV> <vIndex>

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.

fIndex (integer) û Index of the face you want work on.

ithV (integer) û The ith vertex that you want to manipulate.

vIndex (integer) û The index into the vertex list that you want to set to.

SetFaceHandleIndex <fIndex> <ithV> <vIndex>

Identical to setFaceVertexIndex but works on handles for patches.

fIndex (integer) û Index of the face you want work on.

ithV (integer) û The ith vertex that you want to manipulate.

vIndex (integer) û The index into the vertex list that you want to set to.

SetFaceInteriorIndex <fIndex> <ithV> <vIndex>

Identical to setFaceVertexIndex but works on interior handles for patches.

fIndex (integer) û Index of the face you want work on.

ithV (integer) û The ith vertex that you want to manipulate.

vIndex (integer) û The index into the vertex list that you want to set to.

See also