pymel.core.modeling.polyMultiLayoutUV

polyMultiLayoutUV(*args, **kwargs)

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 ../../../_images/create.gif
  If this flag is turned on, the reversed UV pieces are fliped.
gridU / gu int ../../../_images/create.gif
  The U size of the grids.
gridV / gv int ../../../_images/create.gif
  The V size of the grids.
layout / l int ../../../_images/create.gif
  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 ../../../_images/create.gif
  // -lm/layoutMethod layoutMethod integer// (C, E, Q) Which layout method to use: // 0 Block Stacking. // 1 Shape Stacking.
offsetU / ou float ../../../_images/create.gif
  Offset the layout in the U direction by the given value.
offsetV / ov float ../../../_images/create.gif
  Offset the layout in the V direction by the given value.
percentageSpace / ps float ../../../_images/create.gif
  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 ../../../_images/create.gif
  Prescale the shell before laying it out. 0 No scale is applied. 1 Object space scaling applied. 2 World space scaling applied.
rotateForBestFit / rbf int ../../../_images/create.gif
  How to rotate the pieces, before move: 0 No rotation is applied. 1 Only allow 90 degree rotations. 2 Allow free rotations.
scale / sc int ../../../_images/create.gif
  How to scale the pieces, after move: 0 No scale is applied. 1 Uniform scale to fit in unit square. 2 Non proportional scale to fit in unit square.
sizeU / su float ../../../_images/create.gif
  Scale the layout in the U direction by the given value.
sizeV / sv float ../../../_images/create.gif
  Scale the layout in the V direction by the given value.
uvSetName / uvs unicode ../../../_images/create.gif
  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 )