PasteUVW

Categories

texture

Description

Pastes the UVs that are in the clipboard onto the specified texture projection. If the UVs are copied from one texture projection and pasted onto another then the texture coordinates are set based on the indices of the source selection. If they are pasted on the same texture projection then they are scaled and translated so their bounding boxes match (if possible).

Scripting Syntax

PasteUVW( TextureProjection, [SubComp], [PasteUVsMode] );

Parameters

Parameter Type Description
TextureProjection String The target texture projection.
SubComp String The target cluster of sampled points or tagged sampled points
PasteUVsMode siPasteUVsMode Which UVs indices to use (source or target) when the UVs are copied from an object and pasted onto a different object.

Default Value: siDefaultPasteUVsMode

Examples

VBScript Example

' This example demonstrates how to copy the UVs from,
' one object to an other.
NewScene , false
' create a sphere and generate a texture projection for it
' using the GenerateUniqueUVs command.
CreatePrim "Sphere", "MeshSurface", "Sphere1"
GenerateUniqueUVs "Sphere1", "Texture_Projection"
MakeLocal "Sphere1.Scene_Material", siDefaultPropagation
BlendInTextureLayersInsp , , 2, True, siReplaceAndNoBlendInTextureLayers
Translate , 9.0, 0.0, 0.0, siRelative, siView, siObj, siXYZ, , , , , , , , , , 0
' create a second sphere and generate a default cubic projection
' for it
CreatePrim "Sphere", "MeshSurface", "Sphere2"
CreateProjection "Sphere2", siTxtUV, siTxtDefaultCubic, "Texture_Support", "Texture_Projection", True, siRelDefault
MakeLocal "Sphere2.Scene_Material", siDefaultPropagation
BlendInTextureLayersInsp , , 2, True, siReplaceAndNoBlendInTextureLayers
' now, copy the UVs from the Sphere1 to the Sphere2
CopyUVW "Sphere1.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection"
PasteUVW "Sphere2.polymsh.cls.Texture_Coordinates_AUTO.Texture_Projection"