Scripting
Scripts are a powerful way to customize your layers even further. They allow you to add dynamic or static behavior to your layers and compositions, such as syncing elements, adjusting timing, scaling media/text, or customizing compositions for dynamic rendering.
Scripts can be applied to compositions, not only layers. You can also apply more than one script to the same element.
To add a script to a layer, click on the Scripting tab in the Parametrization window, and then click on Add new script. This will open dialog where you can choose your script from the list of available scripts.
There are two basic groups of scripts available:
- Static scripts - these define fixed script options during the parametrization and behave the same for every render execution.
- Dynamic scripts - these pickup script options from render parameters, and thus can behave different for every render execution.
Available scripts
Static
Scripts ordering
A key thing to point out is that scripts are executed in the order that you set them up in the parameterization step.
For example, sometimes you want to apply the shiftIn
before the crop
script. Just think for a second how would you do this if you were doing it manually, and then apply scripts in the same way. This is really important because not applying them in the correct order can cause unwanted results.
To reorder the scripts, you can simply drag and drop them in the order you want inside the Scripting tab.
If two or more parametrized layers contain scripts, the order of script execution is determined first by the order of the layers in the Parametrized layers tab, and then by the order of scripts for the each individual layer.
If output video doesn’t look good, check the order in which you applied the scripts, also make sure that you didn’t add too many scripts, one or two scripts is often enough.
Also, make sure that you don’t add duplicate scripts to the same layer.