sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] LÖVR export

    Scheduled Pinned Locked Moved Plugins
    3 Posts 2 Posters 0 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      immortalx
      last edited by

      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 there 💚

      The 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?

      https://github.com/immortalx74/lovr_export

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        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
        
        

        TIG

        1 Reply Last reply Reply Quote 0
        • I Offline
          immortalx
          last edited by

          Thank you very much TIG! Updated.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement