global proc selectUDIMPatchalt(){
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.5 0.5 0 -db 0 0.7075; // select uv covering the whole tile.
resetPolySelectConstraint;
string $ConstraintSel[] = `ls -sl -fl`; //store initial selection
int $minU = 0; //later will be replaced with intfield query
int $minV = 0;
int $maxU = 1;
int $maxV = 1;
string $finalUV[];
int $uvLoc[];
for($i = 0; $i < size($ConstraintSel) ; $i++) { //testing uvs against bounding box
$uvLoc[$i] = `polyEditUV -q -u -v $ConstraintSel`;
if ($uvLoc[$i] > $minU && $uvLoc[$i] < $maxU)($uvLoc[$i+1] > $minV && $uvLoc[$i+1] < $maxV){
$finalUV[$i] = $ConstraintSel[$i];
}
print $finalUV;
}
selectUDIMPatchalt;
This script is suppose to select a UDIM uv patch based on user specified number.
Right now Im using poly selection constraint to select uvs base on a point in uv space, the parameter controlling the selection is based on distance from the point currently set as 0.7075 max range.
When it runs it will select uvs in a radial shape. With this number it will overshoot beyond the tile border a bit. Then with the for loop, I test the uv selection to see if it lies within the tile. If it is, then it will store in a array. Then finally I would convert the selection to uv shell.
Unfortunately i run into a syntax error running the above code. Any maya wizards out there that can help me with this issue. Thanks