This script is used in a specific workflow when exporting objects to Mari. It tiles up the UV patches (each row has 10 patches)
usage: In each UV patch there has to be unwrapped objects that have only one material assigned to them. And that material has to have "_tg" suffix in its name. When executing the script it automatically adds an unwrap uvw modifier, makes selectionSets based on those materials, and then tiles it up, and adds UDIM number (patch number from Mari) to each materials' name.
Installation: Just drag and drop the script into the 3ds max viewport. Then go to Customize > Customize Interface > category: waRp Tools > Tile the UV patches up
It was only tested in 3ds max 2013
Tutorial (it is recommended to watch it from the start): http://www.youtube.com/watch?v=SMVJRGdrVMI#t=19m38s
If you like all of the scripts that are in the tutorial you can download them by clicking the warp_tools_bundle.rar in the attachment
I'd like to thank Miauu (Kostadin Kotev) http://www.scriptspot.com/users/miauu for helping me improve this script