I would like to automate the creation of dynamically linked After Effects compositions in Premiere. I would normally select a clip and choose Replace with After Effects Composition. Best I can tell this functionality is not currently supported. Is this planned? I’m trying to create a workaround in the meantime but appreciate if anyone has ideas for this as well.
Thanks.
Hi Warren,
Perhaps use importAEComps() to bring in a new projectItem, then replace each trackItem’s backing projectItem with a reference to the newly-imported AE comp?
Yes. That’s the plan for getting the AE comp back into Premiere. I’m first trying to figure out how to create an AE comp from a clip on the timeline using its in/out points.
I’m trying to export a text file with the clip info and media source to then use in AE to create the comps there. Looking now for how to get a text file out of Premiere with UXP, but not seeing it.
1 Like
Bright-siding: PProPanel shows how to send ExtendScript to AE, from within a PPro panel; Some Happy Day™, when AE supports UXP, such workflows may again become possible…
Potentially useful: https://developer.adobe.com/photoshop/uxp/2022/guides/getting-started/writing-a-file/
Note that the link above will prompt the user with a dialog box (ie: require user interaction) - which in my experience is usually not what one wants when scripting.
4 options ( (I can think of):
-
use getFileForSaving (as Bruce suggested above)
-
If you do not want to have user interaction:
- Save in the plug-in data folder - but since you cannot specify where to save, retrieving it will be tricky from other plugin/apps (you also probably need to update your localFileSytem permission to “
plugin“).
```
let uxpStorage = require('uxp').storage.localFileSystem
let dataFolder = await uxpStorage.getDataFolder()
let uxpLogFile = await dataFolder.createEntry(LOG_FILENAME, {type: uxpStorage.types.file, overwrite: true});
```
-
use fs - and I think you would also need to update your manifest to grant fullAccessto localfilesystem ( Note that on windows, it seems like you have to jump thru hoops to make this work)
"manifestVersion": 5,
"requiredPermissions": {
"localFileSystem": "fullAccess",
let fs = require("fs");
fs.writeFileSync(filename, binaryData,{ encoding: null });
- Use persistent token (I have not tried that one yet) - I think it may (?) require a one time acknowledgement from the user to access that file.
For the required permission in the manifest (stated above), see https://developer.adobe.com/photoshop/uxp/2022/guides/uxp_guide/uxp-misc/manifest-v5/#local-filesystem
1 Like