Eyeon:Script/Reference/Applications/Fusion/Classes/Fusion/LoadComp
From VFXPedia
Contents |
Fusion : LoadComp
Arguments
LoadComp( path , locked )
- path
(required, string) Astring containing the full path to a composition on disk.
- locked
(optional, boolean)
A true or false value to determine if the composition opens as locked, or unlocked.
Returns
Composition Object.
Remarks
The LoadComp function opens loads the specified composition on the Fusion Interface Object. It takes two arguments - a path to the composition (required), and an optional True/False flag to determine if the composition is opened as Locked or Unlocked.
The default is to open the composition as Unlocked, which will allow unrestricted access to the composition through the GUI, and all dialog boxes will be displayed normally. If the second argument is set to true then the composition will be opened locked, and all dialog boxes will be suppressed. In this case, the dialogs are always answered with the default value.
For example rendering a composition from an unlocked script will cause a statistics dialog box to appear at the end of the render. Opening the composition in Quiet Mode will prevent this dialog from appearing. Loading a composition with different preferences set that the ones currently loaded in Fusion will also cause a dialog to appear, but when the composition is loaded in Locked mode this dialog will be automatically answered with the default value (accept changes to preferences).
When specifying a path to a composition, remember that the "\" character is special, and use "\\" in your paths wherever you would normally use a "\". Also, remember that the paths are relative to the location of Fusion, not to the location of the Script. So if you had a file called testComp.comp in the same directory as the eyeonScript.exe file, fusion:LoadComp("testComp.comp") would fail, since Fusion would look in its own directory for the file. This is especially true when controlling remote copies of Fusion over the network - if you specify fusion:LoadComp("c:\\Flows\\testComp") for a remote copy of Fusion, it will attempt to load the composition from its own c:\drive, not the one that eyeonScript is running from.
This function returns a handle to the opened composition.
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
composition = fusion:LoadComp("c:\\comps\\testComps.comp") composition:Close() -- Opens a comp in the Locked mode composition = fusion:LoadComp("c:\\comps\\testComps.comp", true) composition:Close()
Tips for LoadComp (edit)
EyeonTips:Script/Reference/Applications/Fusion/Classes/Fusion/LoadComp