## PinUVComponents

### Introduced

v10.0 (2012)

### Description

Mark specific components referenced by a UV property as pinned. Pinned components are used by the UVUnfold feature and are displayed in the texture editor with their own markers. PinUVComponents takes a UV property and a list of component indices as input.

### Scripting Syntax

    PinUVComponents( UVProp, UVComponents );

### Parameters

Parameter | Type | Description
--- | --- | ---
UVProp | Object Name or UVProperty object. | The UV Property name or object.
UVComponents | Array of Integer indices. | Indices of the components to pin.

### Examples

#### VBScript Example

    ' Set up a grid with a texture and an XY projection.

    CreatePrim "Grid", "MeshSurface"

    CreateProjection "grid", , siTxtDefaultPlanarXY, , "Texture_Projection"

    BlendInTextureLayers , , 1, True, siReplaceAndNoBlendInTextureLayers

    SetDisplayMode "Camera", "texturedecal"

    SelectObj "grid.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection"

    ' Pin components 1, 10, 20, 30

    set uvprop = Selection(0)

    PinUVComponents uvprop, Array(1, 10, 20, 30)

    ' Check the pinned component indices with the UVProperty object

    componentIndices = uvprop.PinComponentArray

    for i = lbound( componentIndices ) to ubound( componentIndices )

    	logmessage "Index: " & componentIndices(i)

    next

### See Also

PinAllUVComponents UnPinUVComponents UnPinAllUVComponents