Dynamic Component fun
-
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:
- Load a model
- 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!")')
- 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 -
Thats very cool.
-
Totally Amazing!

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement