Using the Script module in Harmony 10.3

I’m trying to get a feel for how to create modules on the network view and I noticed that the IO tab of the Module Library has a “Script” module.

The documentation on how this module could work is very sparse. The only reference I could find to how this module actually works is here: http://docs.toonboom.com/help/scripting-10.3/scriptmodule/

When I drag the module to the network, I see that a ScriptModule is created. Accessing the Layer Properties for this module gives a window with the following tabs: Attributes, Specifications, Softrender, Initialization, and Cleanup.

The Specifications tab comes pre-populated with the following code:









Based on what I can see in the documentation, this code should create a module with an input and output port, yet in the network view I can see that the module doesn’t have any ports at all. Without any ports, how could I route drawings and other modules through here in order to affect them? (I’ve attached an image of what the module looks like in the network so you can see what I"m talking about.)

I also tried adding an attribute as described in the documentation expecting something to appear in the Attributes tab, but nothing happened at all.

I’m clearly misunderstanding how this module is supposed to work. Help!

ScriptModule.png

I’ve noticed that I can finally get the ports on the script module to show up if I close the project and open it back up again, so it seems like I’m running into some kind of refresh issue. Is there any way to refresh the script module without having to reopen my project?

After a bit more poking around, I’ve noticed that the script module will refresh if I cut it from the network view and paste it back in. This will update the number of ports visible on the network and refresh any changes to the attributes, but to actually run the script, you still need to close the project and reopen it.

Did you try copying the script module and attaching the copy, this should work without having to close/reopen.

Hi,

I reactivate this poste in order to ask if anyone has an example of a script module applying any script function.

I don’t manage to make it do anything.
All the classes used in a normal .js script like ‘node’, ‘column’, ‘element’ are not regognized.

So, a simple function like column.numberOf() won’t work.

Does anyone have an idea, sample or documentation allowing to understand how the script module works?

stefman

Does anyone know anything about this?

Best regards,

stefman