Export working (all source shamelessly grabbed from the obj export plugin)