I made a script for this a LONG time ago, just uploaded it to SM, so have a look https://www.simplymaya.com/download_p...id=52&type=mel