< Previous | Contents | Next >

Fusion Instance

The starting point for all access is a Fusion object. A Fusion object represents a running Fusion instance. It can create, open, and close compositions, stores application wide settings and preferences or persistent metadata. Fusion is able to open and manage multiple compositions from one Fusion instance. The graphical user interface represents these with a Tab-Layout. In scripting all currently loaded compositions are accessible with fu:GetCompList(). The currently active Composition can be accessed via fu.CurrentComp or fu:GetCurrentComp(). To load a composition use fu:LoadComp(path, locked) or create an empty composition using fu:NewComp(locked, auto-close, hidden). You can also quit the Fusion instance by using fu:Quit(). If you are running the script from within Fusion it still will be executed. In reality the script is not bound to the Fusion instance. Instead a FuScript application is spawned that evaluates the scripts and communicates to the running Fusion instance. If your script exits, eventually the FuScript instance will also be stopped. This obviously also applies if running scripts from an external scripting environment as explained in the earlier chapter.