Scripting

Things are moving fast these days.

Nebula3 has a nice and generic scripting system that allows to register commands into the scripting system via a declaration in a nidl file. The only thing required to use it to write small code stubs for exposing functionality to the underlying scripting engine (Lua in our case).
A lot of the the desired functionality is contained in the application layer, and even better, accessible with Messaging::Messages, also defined in a nidl file.
Instead of wrapping all the functions and messages by hand I decided to wrap messages into scripting commands.
The compiler for the nidl files has been extended to automatically create scripting commands for selected messages and everything works nice and smoothly. Obviously it does not make sense to wrap all messages (the scripting system cannot work with complex types from the C++ side anyway), so messages that want to be wrapped are explicit tagged as such.

Additionally a new ScriptingFeature as been added that integrates this into the application layer as well and includes a quick&dirty property that allows to register a script with some functions that are to be called on specific occasion (like onFrame, onCollision, etc)

2 Comments

  1. With Nebula it was possible to control shader attributes and other stuff (bounding box position and size) via scripting, using the nebula toolkit for maya. So I could make a pulsating emissive animation, for example. Is that still possible?

    • johannes

      I remember the old toolkit, and I think I know what you are referring to. Setting shader variables on specific model nodes is possible from the scripting system, so it should work, not in the same way though (like as in just writing a little code snippet in maya).

Leave Comment