> Mike Cook Portfolio » Maya MEL – UV Inspector

At Stargate Studios, we use the Previzion system and it can be very picky when it comes to UVsets. Especially if you are using CGFX shaders that rely on the name of the UVsets. We have run into issues where geometry generated in Lightwave comes into Maya with sometimes 20 different UVsets. Some empty, some only containing certain faces.

UV Inspector is a tool that I’ve written that gives the user visual aid and batch capabilities when dealing with many objects with multiple UVsets. All the settings are easily customizable and expandable to do anything you want really. Our most used features are what are currently on display.

  • UV Information Panel – Displays all selected objects, as well as how many UVsets each has, the name of the first UVset, if there is a second UVset it will display the name of it as well.
  • Stats Panel – Gives total counts of how many meshes are selected, meshes that have more than 1 UVset, meshes who have UVset1 not named map1, meshes who have UVset2 not named lightmap.
  • Open UV Editor – Opens the standard Maya UV Editor window.
  • Rename Map 1 – Renames all selected objects first UVset to map1.
  • Rename Map 2 to Lightmap – Renames all selected objects second UVset (if available) to lightmap.
  • Copy UVs to Map 1 – Attempts to consolidate all the UVsets into map1. Basically a UV merge function.

In this example, some of the cubes have map1 named cubeUVs. They are selected and batched to all be named map1. The torus have secondary UVsets that aren’t named lightmap. Those are batch converted to all be named lightmap. And finally the cones have UV data in the second UVset but not the first UVset. They have their UVs merged into map1.