The move tool is the main reason why I created this script. I needed a method of quickly giving UVs an offset of 1. This is useful for temporarily moving UVs out of the way or for moving overlapping UVs out of the 0-1 range. Overlapping UVs can result in artifacts when baking textures (shadow maps, occlusion, 3d textures, normal maps). By moving them out of the 0-1 range they are not used by the baking process. With an offset of exactly 1 the textures on the UVs appear unchanged.
Calc: UV Difference – This function can be found in the popup menu to the right. It measures the distance between two UVs for the U and V value.
Change Precision – This changes the number of decimals on the text fields. It only affects the display. The internal calculations use a 15 digit precision.
Quick Presets – The quick preset buttons perform the rotate instantly. The presets found in the popup menu to the far right only copy their value to the text field and do not perform the rotate.
Calc: UV Angle – This utility can be found in the popup menu and calculates the angle between two UVs. This can be used for straightening out rotated parts.
Set Pivot – Here you can specify a custom pivot point. By default the UVs rotate around their center point. The popup menu contains presets and functions.
Mirror U / V – This mirrors UVs with the option to specify a pivot point. By default it mirrors around its center.
Divide Values (1 / Value) – This seemingly obscure functionality can be found in the upper popup menu. With this you can rescale something back to its original size. For instance 400% becomes 25%. It can also be used to obtain fractions. For instance if you divide 16 it becomes 1/16, which is 0.0625.
Orient Shells – This function straightens the orientation of your selected UV shells. It treats each shell separately. The straightening is done by looking at the bounding box size of a shell. With most shapes this seems to work. This script works faster if you select less UVs per shell. This is noticeable with high UV counts (10k+). Ideally you only need to select one UV per shell.
Orient Single – This orients a single UV shell. It skips the shell definition pass which can be time consuming on high polygon objects. Recommended if you need to orient only a few shells that have a lot of UVs.
Stack Shells – This places UV shells exactly on top of each other. Useful for meshes that are similar and that can share the same texture space. It only moves the shells. It does not do anything fancy like match scale or orientation.
Center UVs – This moves the selected UVs as a whole to the center (0.5, 0.5). Useful for layouts that are symmetrical (for instance heads).
Align UV Shells – This aligns UV shells to each other.
Just like with Orient Shells you will get a faster performance if you select less UVs per shell.
Flatten UVs – This flattens UVs to their minimum, maximum or center.
2) Copy the icons (.bmp) to this directory:
3) Restart Maya or enter
rehash in the script editor.
If you wish to install a button on your current shelf then enter the following command:
sdv_shelfButton("sdv_xformUV", "sdv_xformUV", "sdv_xformUV.bmp")
v2.7 – 03 Nov 2008 – Added Center, Flatten and Orient.
v2.6 – Added Align UV Shells.
v2.5 – Added Stack UV Shells. Created a more streamlined UI.
v1.0 – 07 Jan 2000 – Created the move section.