## FlipUVW

### Description

For each provided polygon, the UVWs of the sample points of the polygon are exchanged to flip the texturing of the polygons. The tool is primarily intended for quadrilaterals, although it will work for any polygon.

### Scripting Syntax

    oReturn = FlipUVW( TextureProjection, SubComp, [Pivot] );

### Return Value

Returns the Object Name of the newly created FlipUVW operator.

### Parameters

Parameter | Type | Description
--- | --- | ---
TextureProjection | String | The texture projection to modify.
SubComp | String | Cluster of polygons or tagged polygons to flip
Pivot | Long | Which way to flip the polygon UVWs Default Value: 1
Possible Values: | Description:
0 | Use first vertex as pivot (i.e., flip diagonally).
1 | Flip horizontally.
2 | Flip vertically.

### Examples

#### VBScript Example

    ' Create a sphere, add texture projection, and
    ' assign default image to scene's material:
    oSphere = CreatePrim( "Sphere", "MeshSurface" )
    CreateProjection oSphere, siTxtPlanarXY, siTxtDefaultPlanarXY
    SIApplyShaderToCnxPoint "Image", "Sources.Materials.DefaultLib.Scene_Material.Phong.diffuse"
    ' Now flip horizontally the given polygons:
    oFlipuvwOp = FlipUVW( oSphere & ".polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection", oSphere & ".poly[12,20,44,52]", 1 )
    LogMessage "New Flip UVW operator: " & oFlipuvwOp
    SelectGeometryComponents oSphere & ".poly[12,20,44,52]"
    ' View the results:
    SetDisplayMode "Camera", "textured"
    ' Running this script should log the following:
    ' ---------------------------------------------
    'INFO : "New Flip UVW operator: sphere.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection.Flipuvw"

### See Also

CycleUVW