heres part of the script that ive been working on if anyone is interested. Essentially what its suppose to do is select the UDIM patch user specifies. For example if user say select 1001 UDIM (u1_v1) uv, it will select all the uvs within the UDIM tile boundary. Its using PolySelectconstraint as the backbone for the uv selection. Unfortunately, due to the inaccuracy of the maximum distance boundary, I had to do a lot of testing for the limits. Also In my findings, because its distance based on a specified point in the u and v space. It selects uvs in a radial falloff. Therefore I have to run it in several passes to select the uvs near the corner of the uv tile.
global proc selectUDIMPatch(){
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.5 0.5 0 -db 0 0.5;
string $Cnstpass1[] = `ls -sl -fl`; //center limit
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.75 0.75 0 -db 0 0.25;
string $Cnstpass2[] = `ls -sl -fl`; //top right center limit
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.9 0.9 0 -db 0 0.1;
string $Cnstpass3[] = `ls -sl -fl`; //top right small limit
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.1 0.9 0 -db 0 0.1;
string $Cnstpass4[] = `ls -sl -fl`; //top left small limit
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.1 0.1 0 -db 0 0.1;
string $Cnstpass5[] = `ls -sl -fl`; //botton left limit
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.99 0.99 0 -db 0 0.01;
string $Cnstpass6[] = `ls -sl -fl`; //tiny right limit
polySelectConstraint -m 3 -t 0x0010 -d 1 -dp 0.05 0.05 0 -db 0 0.01;
string $Cnstpass7[] = `ls -sl -fl`; //tiny left limit
resetPolySelectConstraint;
string $storedUV[];
string $strAryA, $strAryB;
for( $i=1; $i<6; ++$i){
$strAryA = ("$Cnstpass" + $i);
$strAryB = ("$Cnstpass" + ($i+1));
$storedUVs[] = stringArrayCatenate($strAryA,$strAryB);// combine all the string arrays into one
}
string $finalUVs[] = stringArrayRemoveDuplicates $storedUVs; // remove duplicate of uvs due to overlap
select $finalUVs;
}
selectUDIMPatch;
unfortunately when I run it I get this error.
// Error: $storedUVs[] = stringArrayCatenate($strAryA,$strAryB);
//
// Error: Line 22.24: Syntax error //
// Error: string $finalUVs[] = stringArrayRemoveDuplicates $storedUVs;
//
// Error: Line 24.71: Invalid use of Maya object “stringArrayRemoveDuplicates”. //
maybe there is a better way to combine the string arrays into one?? Anyone have some suggestion
Thanks