• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Dynamic Component fun

Scheduled Pinned Locked Moved Extensions & Applications Discussions
extensions
3 Posts 3 Posters 340 Views 3 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.
  • A Offline
    AdamB
    last edited by 27 Sept 2012, 09:14

    As a bit of fun I wrote a Ruby importer of Quake levels into SketchUp. The importer marks up the ComponentInstances with DynamicComponent animations so the doors and platforms all work within LightUp. Perhaps I should check whether Quake buildings meet today's work lighting Regs.. 😄

    [flash=800,600:3nte3by9]http://www.youtube.com/v/Un0LheJYeEY[/flash:3nte3by9]

    LightUp has an automation feature that runs Ruby functions you've attached to your model from various Events during Tourtool. They're stored in an attribute dictionary (called :lightup) on the Model and Components of your SketchUp model - there are quite a few callbacks that are supported.

    Try this:

    1. Load a model
    2. At Ruby console type:

    Sketchup.active_model.set_attribute(:lightup, 'onstart', 'puts("Starting at #{Time.new}")')

    and/or

    Sketchup.active_model.set_attribute(:lightup, 'onstop', 'puts("Taadaa!")')

    1. Start Tourtool and see the messages printed on the Ruby console.

    Using these functions, you could build a sophisticated experience that linked together interactions.

    Other hooks are:

    onreset: called for a new model
    onupdate: called at 15Hz
    oncreate: called for Component
    onpick: clicked on Component

    Developer of LightUp Click for website

    1 Reply Last reply Reply Quote 0
    • P Offline
      Pixero
      last edited by 27 Sept 2012, 11:01

      Thats very cool.

      1 Reply Last reply Reply Quote 0
      • P Offline
        pilou
        last edited by 27 Sept 2012, 11:08

        Totally Amazing! ☀

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

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

        Advertisement