texture
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.
oReturn = FlipUVW( TextureProjection, SubComp, [Pivot] ); |
Returns the Object Name of the newly created FlipUVW operator.
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
|
' 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" |