Custom actions can be implemented as Python scripts that can be invoked from the UI in the same way as native Composite actions.
Action scripts can be located anywhere on the local file system or on the network. Two environment variables (and toxik.ini
options) control the loading and searching of action scripts:
DL_SCRIPTED_ACTIONS_LOAD_ON_STARTUP (toxik::scripting::scriptedActionsLoadOnStartup)
- Set to 1 or 0 to control whether to load and register the scripted actions during the Composite startup.
- The default behavior is to register action scripts on startup.
- Action scripts can be loaded (or reloaded) at any time through the (Re)Load Scripts entry of the Scripts top menu.
DL_SCRIPTED_ACTIONS_PATH (toxik::scripting::scriptedActionsPath)
- Search path for action scripts; a list of directory paths separated by the character conventionally used by the operating
system to separate search path components (“:” on Linux and Mac OS, “;” on Windows).
- By default, the search path is empty, but the following directory of the Composite installation is always searched for action
scripts: .
For more information on how to write scripted actions and examples, please refer to the main page of the scripting API documentation.