This is a re-write of the patch submit by Ramon Carlos Ruis, more info in the tracker: https://projects.blender.org/tracker/index.php?func=detail&aid=6005&group_id=9&atid=127