polyEditUV
- Example: find a UV called object.map[21]
polyEditUV -q -uValue object.map[21];
- Example: Select a vertex, and find it's U value:
string $sel[] = `ls -fl -sl`;
string $UV[] = `polyListComponentConversion -tuv $sel[0]`;
float $uval[] = `polyEditUV -q -uValue $UV[0]`;
PyMel has this shorthand:
uv = meshShape.vtx[52].getUV()
However, I've had it return
[0,0]
values more than once: Seems broken. Best use the above method:
import pymel.cpre as pm
def getUv(vertex):
uv = pm.polyListComponentConversion(vertex, toUV=True)
# the uValue or vValue argument both return U & V values, weird:
return pm.polyEditUV(uv[0], query=True, uValue=True)
Where
vertext
is in the form of a PyNode poly mesh, like:
myMesh.vtx[52]