pymel.core.modeling.subdLayoutUV¶
- subdLayoutUV(*args, **kwargs)¶
Move UVs in the texture plane to avoid overlaps.
Flags:
Long Name / Short Name Argument Types Properties caching / cch bool Modifies the node caching mode. See the node documentation for more information. Note:For advanced users only. constructionHistory / ch bool Turn the construction history on or off. flipReversed / fr bool If this flag is turned on, the reversed UV pieces are fliped. frozen / fzn bool 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. layoutMethod / lm int Which layout method to use: 0 Block Stacking. 1 Shape Stacking. name / n unicode Sets the name of the newly-created node. If it contains namespace path, the new node will be created under the specified namespace; if the namespace does not exist, it will be created. nodeState / nds int Modifies the node state. See the node documentation for more information. Note:For advanced users only. Flag can have multiple arguments, passed either as a tuple or a list. 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. rotateForBestFit / rbf int 0 No rotation is applied. 1 Only allow 90 degree rotations. 2 Allow free rotations. scale / sc int 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 Which UV edges should be cut: 0 No cuts. 1 Cut only along folds. 2 Make all necessary cuts to avoid all intersections. worldSpace / ws bool If true, performs the operation in world space coordinates as opposed to local space. Advanced flags Derived from mel command maya.cmds.subdLayoutUV
Example:
import pymel.core as pm # Create a cube mel.eval( "createSubdCubeProc" ) # Layout all UVs in the texture plane. pm.subdLayoutUV( 'subdivCube1.smf[*][*]', l=2, fr=True, se=2, sc=1 )