convert animation curve to option: http://stackoverflow.com/a/18873820/239380