Thanks for this code snippet, this made things quite easy to expose the functionality for blueprints!