ModifyUVSetByCont ourStretching

Description

Modify an existing set of texture coordinates by contour stretching the polygon inputs onto a "surface" pinned on the contour of the polygon inputs. A proper contour of the polygon inputs must exist to guide the contour stretching process.

Scripting Syntax

    ModifyUVSetByContourStretching( InputObjs, TextureProjection, [ContourStretchingMethod], [MaintainAspect], [CornerPoints] )

Parameters

Parameter | Type | Description
InputObjs | String | List of polygon inputs to which the polygon UV texture coordinate contour stretching operator is applied. Default Value: Selected objects.
TextureProjection | String | Texture space to modify.
ContourStretchingMethod | siTxtContourStretchingMethod | Polygon cluster contour stretching method. Default Value: siContourStretchingWalkingOnMesh
MaintainAspect | Boolean | Whether to maintain aspect ratio. Default Value: False
CornerPoints [in/out] | String | Optional list of point inputs that define corners on the boundary of the polygon inputs. Each input may contain from 0 to N points and only up to the first 4 points of each input will be used to define corners. If the input corners are not part of the contour of the polygon inputs then they are ignored. Default Value: Empty. Corners are derived automatically internally.

Return Value

Returns an XSICollection that contains the created operators.

Examples

VBScript Example

    Dim l_CreatedObjects
    NewScene
    'This example applies polygon UV contour stretching as a modifier to an existing texture space.

    CreatePrim "Sphere", "MeshSurface"
    ApplyShader , , , , siLetLocalMaterialsOverlap
    SIApplyShaderToCnxPoint "Image", "sphere.Material.Phong.diffuse"
    CreateProjection "sphere", siTxtPlanarXY, siTxtDefaultSpherical, "Texture_Support", "Texture_Projection"
    SetInstanceDataValue , "sphere.Material.Phong.Image.tspace_id", "Texture_Projection"
    SetDisplayMode "Camera", "textured"

    'Create cluster to modify
    ActivateRaycastPolySelTool
    ToggleSelection "sphere.poly[19,20,27,28,35,36,43,44]", , True
    CreateCluster

    'Modify UV by contour stretching.  Contour Stretching method is default and MaintainAspect is default Corners are derived automatically
    set l_CreatedObjects = ModifyUVSetByContourStretching( "sphere.polymsh.cls.Polygon","sphere.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection" )

    'What was created
    logmessage "Created Operators: " & l_CreatedObjects

See Also

GenerateUVSetByContourStretching

Autodesk Softimage v7.5