Go to: Synopsis. Flags. Return value. Keywords. Related. Python examples.
polyUVSet([allUVSets=boolean], [allUVSetsIndices=boolean], [copy=boolean], [create=boolean], [currentLastUVSet=boolean], [currentUVSet=boolean], [delete=boolean], [newUVSet=string], [projections=boolean], [rename=boolean], [uvSet=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
polyUVSet is undoable, queryable, and editable.
Command to do the following to uv sets:
- delete an existing uv set.
- rename an existing uv set.
- create a new empty uv set.
- copy the values from one uv set to a another
pre-existing uv set.
- set the current uv set to a pre-existing uv set.
- query the current uv set.
- set the current uv set to the last uv set added to an object.
- query the names of all uv sets.
allUVSets, allUVSetsIndices, copy, create, currentLastUVSet, currentUVSet, delete, newUVSet, projections, rename, uvSet
| Long name (short name) |
[argument types] |
Properties |
uvSet(uvs)
|
string
|
 
|
|
Specifies the name of the uv set that this command needs to work on.
This flag has to be specified for this command to do anything meaningful
other than query the current uv set.
In query mode, this flag needs a value.
|
|
currentUVSet(cuv)
|
boolean
|
 
|
|
This flag when used will set the current uv set that the object needs to
work on, to be the uv set corresponding to the name specified with the
uvSet flag. This does require that a uvSet with the specified name exist.
When queried, this returns the current uv set.
In query mode, this flag needs a value.
|
|
currentLastUVSet(luv)
|
boolean
|
 
|
|
This flag when used will set the current uv set that the object needs to
work on, to be the last uv set added to the object.
If no uv set exists for the object, then no uv set name will be returned.
In query mode, this flag needs a value.
|
|
allUVSets(auv)
|
boolean
|
 
|
|
This flag when used in in a query will return a list of all
of the uv set names
In query mode, this flag needs a value.
|
|
allUVSetsIndices(uvn)
|
boolean
|
 
|
|
This flag when queried will return a list of the logical plug
indices of all the uv sets in the sparse uv set array.
In query mode, this flag needs a value.
|
|
rename(rn)
|
boolean
|
 
|
|
This flag when used will result in the renaming of the uv set corresponding
to the name specified with the uvSet flag to the name specified using the
newUVSet flag.
In query mode, this flag needs a value.
|
|
newUVSet(nuv)
|
string
|
 
|
|
Specifies the name that the uv set corresponding to the name specified with
the uvSet flag, needs to be renamed to.
In query mode, this flag needs a value.
|
|
delete(d)
|
boolean
|
 
|
|
This flag when used will result in the deletion of the uv set corresponding
to the name specified with the uvSet flag.
In query mode, this flag needs a value.
|
|
copy(cp)
|
boolean
|
 
|
|
This flag when used will result in the copying of the uv set corresponding
to name specified with the uvSet flag to the uvset corresponding
to the name specified with the newUVSet flag
In query mode, this flag needs a value.
|
|
create(cr)
|
boolean
|
 
|
|
This flag when used will result in the creation of an empty uv set
corresponding to the name specified with the uvSet flag. If
a uvSet with that name already exists, then no new uv set will
be created.
In query mode, this flag needs a value.
|
|
projections(pr)
|
boolean
|
 
|
|
This flag when used in a query will return a list of polygon
uv projection node names. The order of the list is from
most-recently-applied to least-recently-applied.
In query mode, this flag needs a value.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
boolean
Success or Failure.
poly, uvSet, currentUVSet, renameUVSet, deleteUVSet, copyUVSet, createUVSet
polyClipboard, polyCylindricalProjection, polyEditUV, polyForceUV, polyMapCut, polyMapDel, polyMapSew, polyMoveFacetUV, polyMoveUV, polyPlanarProjection, polyProjection, polySphericalProjection, untangleUV
import maya.cmds as cmds
# start with poly object
cmds.polySphere(n='plg', cuv=1, r=10.0)
# Make a copy of "map1" to a new uvset. The
# name of which is automatically generated and returned.
cmds.polyUVSet( copy=True, uvSet='map1' )
# Create a new empty uv set
cmds.polyUVSet( create=True, uvSet='map2' )
# To set the current uv set to be "map2".
cmds.polyUVSet( currentUVSet=True, uvSet='map2')
# To set the current uv set to the last uv set added to an object.
cmds.polyUVSet( currentLastUVSet=True )
# To query the current uv set.
cmds.polyUVSet( query=True, currentUVSet=True )
# To rename a currently existing uv set from "map2" to "map3".
cmds.polyUVSet(rename=True, newUVSet='map3', uvSet= 'map2')
# Rename the current uv set (if any) to "map4".
cmds.polyUVSet(rename=True, newUVSet='map4' )
# To delete a currently existing uv set "map4".
cmds.polyUVSet( delete=True, uvSet='map4')
# To delete the current uv set (if any)
cmds.polyUVSet( delete=True )
# Copy values of uvset "map1" to "map2"
cmds.polyUVSet( copy=True, nuv='map2', uvSet='map1' )
# Copy values of the current uvset to "map2"
cmds.polyUVSet( copy=True, nuv='map2' )
# Create a new empty uv set with a generate new name
# The newly generated name is returned.
cmds.polyUVSet( create=True )
# To query all of the uv sets
cmds.polyUVSet( query=True, allUVSets=True )
# To query the logical indices of the uv sets in the
# node's uv set array
node = "plg"
indices = cmds.polyUVSet(node, query=True, allUVSetsIndices=True)
for i in indices[:]:
name = cmds.getAttr(node+".uvSet["+str(i)+"].uvSetName")
print("Found uv set called " + name )