I use the UV Nightshade Editor script for unwrapping and packing UV's, it has revolutionized my work flow for unwrapping and editting UVs in Maya. It can do what you asked and way way more. I like it way more than I ever like max for headus. Here's a link: http://www.creativecrash.com/maya/script/nightshade-uv-editor
made a script like that in max to explode and also implode (reset all back to 0-1 uv range) it's not that difficult (you have to scan overlapping uv shells and store their overlapping count) but it saves fivebrazidillion hours when baking, changing uvs re baking, changing uvs re re baking ...
PolyHertz, I tested your script and it seems to not leave behind the final non overlapping uv shell in many cases. So for instance if I have 4 identical overlapping uv shells instead of leaving the 4th and final shell for baking in 0-1 space it moves it with the other 3 shells to "1-2" space.
Might take a stab at this today. Need more Maya scripting to do as at work there's been less of that haha. Edit: thinking about this something that might also happen is you might move both uv shells as you would obviously be iterating over every uv shell unless you check all shells versus ones already processed. Might be…
Here's a very basic script that should do what you want. Select the UV borders, and then run it (Also works with everything selected but will be slower). It just checks if any of the selected UV points are directly overlapping each other, nothing fancy like checking for vector intersections. $uvShellVerts = `ls -sl…
I've tried to find a way to tell whether the UV shell is flipped or not but couldn't find any. There's an error in the Maya help file for the polyEvaluate command in the mel section. It states that for the -boundingBox2d flag, the mel command will return the UV coordinates for the bounding box as 4 float values in Mel and…
Then a simple workaround that might work is if you could check the centered pivot for each shell, and check for shell pivots that are on the same location (with a small tolerance). This would find stacked shells given that they are in fact neatly placed on top of each other. Then you might work on a solution to figure out…
I had a look at the UV MEL commands and there doesn't seem to be anything to easily query for overlapping. I take it you'd want this for prepping for baking? Is it safe to assume that the overlapping UV part is identical to the underlying one when it comes to shape and UV-space-position?