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
FlipUVW( TextureProjection, SubComp, [Pivot] )
Parameters
|
Parameter |
Type |
Description |
|
TextureProjection |
The texture projection to modify. |
|
|
SubComp |
Cluster of polygons or tagged polygons to flip |
|
|
Pivot |
Which way to flip the polygon UVWs Default Value: 1 Possible Values: • 0: Use first vertex as pivot (i.e., flip diagonally). • 1: Flip horizontally. • 2: Flip vertically. |
Return Value
Returns the Object Name of the newly created FlipUVW operator.
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
Autodesk Softimage v7.5