place the UVs of the selected polygonal objects so that they do not overlap.
Flags:
Long Name / Short Name | Argument Types | Properties | |
---|---|---|---|
flipReversed / fr | bool | ![]() |
|
|
|||
gridU / gu | int | ![]() |
|
|
|||
gridV / gv | int | ![]() |
|
|
|||
layout / l | int | ![]() |
|
How to move the UV pieces, after cuts are applied: 0 No move is applied. 1 Layout the pieces along the U axis. 2 Layout the pieces in a square shape. 3 Layout the pieces in grids. 4 Layout the pieces in nearest regions. |
|||
layoutMethod / lm | int | ![]() |
|
|
|||
offsetU / ou | float | ![]() |
|
|
|||
offsetV / ov | float | ![]() |
|
|
|||
percentageSpace / ps | float | ![]() |
|
When layout is set to square, this value is a percentage of the texture area which is added around each UV piece. It can be used to ensure each UV piece uses different pixels in the texture. Maximum value is 5 percent. |
|||
prescale / psc | int | ![]() |
|
|
|||
rotateForBestFit / rbf | int | ![]() |
|
|
|||
scale / sc | int | ![]() |
|
|
|||
sizeU / su | float | ![]() |
|
|
|||
sizeV / sv | float | ![]() |
|
|
|||
uvSetName / uvs | unicode | ![]() |
|
Specifies the name of the uv set to edit uvs on. If not specified will use the current uv set if it exists. Flag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.polyMultiLayoutUV
Example:
import pymel.core as pm
# Create 3 objects with overlapping UVs
sphere = pm.polySphere()
cylinder = pm.polyCylinder()
torus = pm.polyTorus()
pm.polyAutoProjection( sphere[0], ibd=1, cm=0, l=2, sc=1, o=1, p=4, ps=0.2 )
pm.polyAutoProjection( cylinder[0], ibd=1, cm=0, l=2, sc=1, o=1, p=4, ps=0.2 )
pm.polyAutoProjection( torus[0], ibd=1, cm=0, l=2, sc=1, o=1, p=4, ps=0.2 )
pm.select( sphere[0], cylinder[0], torus[0] )
# Layout the UVs in a square, allow free rotations, scale uniformly
pm.polyMultiLayoutUV( scale=1, rotateForBestFit=2, layout=2 )