Expanding your Modules
Actions define the functionalities of a Module. If Modules are the building blocks of a project, then Actions specify what a single building block does. These might be simple operations like starting or stopping the timeline, or whole show control scripts.
To create a new Action, right click onto the Module and select “Add Action”. Enter a name for your action and press “OK”.
Each Action can receive Input, send Output, and trigger other Actions. To define a connection, you can draw a “wire” between two Actions. Just click on the right box of your first Action and drag it to the left box of your second Action. The first Action will now send its Output over the wire and will also trigger the connected Action.
Creating a PLAY Action over Wire Connection
- Create a new Module in the viewport.
- Create a new Action in your Module called “play()”.
- Drag the “Pixera” Module, which is already in the viewport, next to your new Module.
- Search in the “Pixera” Module for the “Timeline” folder. Open it by pressing the folder symbol.
- Now all available timelines are displayed. Select the timeline of your choice (in our case “Timeline 1”) and expand it by pressing on the bracket symbol.
- In here, all properties of the timeline are shown. To start the timeline, connect your “play()” Action of your own Module to the “play()” of the timeline.
- Your new Action is now going to trigger the play-property of the timeline. To test it, click on the arrow symbol to the left of the name.
Connecting an Action to a Button
- Go to the UI and create a new button.
- Select the Button and open the “Action” field in its properties by pressing on the arrow.
- Now “NewModule” or your Module’s name should be displayed. If it isn’t, keep the button selected, click on the expand symbol above and select it.
- When clicking on the Module name, all its Actions are shown. Select the Action you want to connect to the Button. You can scroll through the list by left clicking and dragging it.
- Save your changes in the UI.
- Deactivate the edit mode. Now, when clicking the Button, the Action is triggered.
Creating a Master Fader via a Wire Connection
- Create a new Module with an Action called “fader()”.
- Again, drag the “Pixera” Module next to your Module and open the Timeline folder.
- Search for the “setOpacity(double value)” property of your timeline and connect your Action to it.
- The value which the “fader()” action sends, will be the new opacity value of the timeline. You can try this by right clicking on “fader()” and selecting “Run”. There you can enter a value that will be passed on to the Action. In our case “fader()” will directly forward its input value to the timeline. Note that possible opacity values are between 0 (invisible) and 1 (fully visible).
- Of course, we want to change the opacity dynamically by using a Slider/Fader. Switch to the UI and create a new Slider.
- Connect the “fader()” Action to the Slider.
- The default value range of a Slider is [0-100], therefore we have to adjust the range to [0-1], with a default value of 1. This is done in the “Range” Property of the Slider.
- Using the Slider will now directly adjust the opacity of the timeline.