I just posted up a couple of plugins I use to do this:
http://www.independentdeveloper.com/...ap-by-material
The first one applies materials to a model by crease angle, effectively breaking it into contiguous sections.
The second one automatically applies planar mapping to a model by material, where each section of the model that has the same material color forms a contiguous area of map space.
The second one requires a little manually adjustment to the map which is why I haven't posted it up earlier--you'll need to repack the map after you use it, unless you don't mind wasted texture space. (Probably doesn't matter for still images, but matters a lot for games.)