I'm trying to select UV shells by index and then run some code and then select the next UV shell and run that same code, etc. Imagine if you wanted to scale each UV shell by 50%, that's not what I need to do, but if I could figure out how to select each shell one at a time in the script that would solve my problem. Is this possible, I searched for about a day and there's nothing in the documentation.
try texGetShells. its located in C:\Autodesk\Maya20XX\scripts\others\texGetShells.mel its a hidden mel script thats not documented. Its being used in a lot of the functions inside uv toolkit. I have been digging around that folder for some hidden cmds for mu UDIM layout script ive been working on forever.
Update, someone from the Autodesk forum was able to figure out how to convert the first shell in the array so you can select it, now I need to work on storing each shell into it's own array to loop through and run my code on which I think I know how to do using the size command and a counter. Will report back if I get it figured out.
Replies
select $tempShell;
tokenize($tempShell[0], $tempShell);
select $tempShell;
$shellUVs = `ls -sl`;
$findShells = `texGetShells`;
$numbShells = `size $findShells`;
$shellIndex = 0;
for ($item = 0; $item < $numbShells; ++$item)
{
select $shellUVs;
$findShells = `texGetShells`;
tokenize($findShells[$shellIndex], $findShells); // ["xx.map[0] xx.map[1]",] -> ["xx.map[0]","xx.map[1]"]
select $findShells;
polyEditUV -pu 0.25 -pv 0.75 -a -14.449228 -rr 1 ;
$shellIndex = $shellIndex + 1;
}