pymel.core.modeling.polyLayoutUV

polyLayoutUV(*args, **kwargs)

Move UVs in the texture plane to avoid overlaps.

Flags:
Long name (short name) Argument Types Properties
caching (cch) bool ../../../_images/create.gif ../../../_images/edit.gif
 
Toggle caching for all attributes so that no recomputation is needed
constructionHistory (ch) bool ../../../_images/create.gif ../../../_images/query.gif
 

Turn the construction history on or off (where applicable). If construction history is on then the corresponding node will be inserted into the history chain for the mesh. If construction history is off then the operation will be performed directly on the object.Note:If the object already has construction history then this flag is ignored and the node will always be inserted into the history chain.

flipReversed (fr) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
If this flag is turned on, the reversed UV pieces are fliped.
layout (l) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.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.
layoutMethod (lm) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Which layout method to use:0 Block Stacking.1 Shape Stacking.
name (n) unicode ../../../_images/create.gif
 
Give a name to the resulting node.
nodeState (nds) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Defines how to evaluate the node. 0: Normal1: PassThrough2: Blocking3: Internally disabled. Will return to Normal state when enabled4: Internally disabled. Will return to PassThrough state when enabled5: Internally disabled. Will return to Blocking state when enabledFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

percentageSpace (ps) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.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.

rotateForBestFit (rbf) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
0 No rotation is applied. 1 Only allow 90 degree rotations. 2 Allow free rotations.
scale (sc) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
How to scale the pieces, after move and cuts:0 No scale is applied.1 Uniform scale to fit in unit square.2 Non proportional scale to fit in unit square.
separate (se) int ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Which UV edges should be cut:0 No cuts.1 Cut only along folds.2 Make all necessary cuts to avoid all intersections.
uvSetName (uvs) unicode ../../../_images/create.gif ../../../_images/query.gif
 
Specifies the name of the uv set to edit uvs on. If not specified will use the current uv set if it exists.
worldSpace (ws) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
If true, performs the operation in world space coordinates as opposed to local space.Common flags

Derived from mel command maya.cmds.polyLayoutUV

Example:

import pymel.core as pm

# Create a sphere.
pm.polySphere( n='sph' )

# Use a plane projection on half the faces
pm.select( 'sph.f[0:200]' )
pm.polyProjection( type='Planar' )

# Layout all UVs in the texture plane.
pm.polyLayoutUV( 'sph.f[*]', l=2, fr=True, se=2, sc=1 )