[Plugin] LÖVR export
-
This won't be of interest to many but I thought of posting it here just in case.
I'm doing a VR game with the LÖVR framework and using Sketchup as a level-editor.
I wanted to export custom data for pickups, trigger zones, spawn points, etc. so I've made this simple extension that exports coordinates/matrices in text files.
I've never touched the Sketchup API or Ruby before so excuse me if there's some atrocious code in thereThe way it works is it gets components with predefined tags and exports either 4x4 matrices or just their positions, in an easy to parse CSV format.
NOTE: It overwrites files without warning! Anyone knows how I could check for that and display a prompt?GitHub - immortalx74/lovr_export
Contribute to immortalx74/lovr_export development by creating an account on GitHub.
GitHub (github.com)
-
if File.exist?(some_full_file_path_you_are_exporting_to) ### yn = UI.messagebox() ### to ask if you want to overwrite ### look at API methods... ### if yn ### == "yes" ### overwrite file ### else ### leave file alone ### end end
-
Thank you very much TIG! Updated.
Advertisement