Copy link to clipboard
Copied
When we try to relink a photoshop layer using a backed up file with different name, After effects doesn't automatically link to the correct layer.
We are using the following code for relinking the psd file.
app.project.items[1].replace(new File("psdFilePath"))
After the relink, instead of a single layer the whole psd file layers will get merged on to the first item.
Same workflow in Premiere pro, after relinking- Premiere Pro detects the original layer instead of merging all layers.
Is there any way to point to the respective layer of a PSD during relink media in After effects,
Or can this be added as an enhancement in After effects
Thanks.
Copy link to clipboard
Copied
We've already discussed this issue with the AE team. The recommended approach = import the new .psd file, linking to the correct layer, and replace existing references (to the old .psd file/layer) in comps, with references to the newly-imported file/layer combination.
Copy link to clipboard
Copied
Hi Bruce,
Thank you for the response.
We are not able to get 'Layer Options' popup to select the layers from AEFT extendscript API.
Always the psd will come as a merged single item, when we use the app.project.importFile(importOptions).
Is there any specific parameter needs to be added in the 'importOptions' to get the layer options during import?
Thanks
Copy link to clipboard
Copied
I think you're looking for ImportAsType.COMP, or ImportAsType.COMP_CROPPED_LAYERS...
Copy link to clipboard
Copied
Hi Bruce,
We tried both COMP and COMP_CROPPED_LAYERS. Both are importing all the layers inside a new folder with a new composition. What we are looking for is to dynamically relink the layer to the corresponding layer of the imported file. We are looking for an API option similar to 'Replace Footage> File>Choose Layer'.
Is there any command to do that?
Copy link to clipboard
Copied
There is no such API option, and it's unlikely that AE will add a new ExtendScript-based option.
The recommended process is to import the new footage item (new path, correct layer chosen), then go through previously existing Comps, and replace references to the old footage item, with references to the new footage item.
Copy link to clipboard
Copied
Hi Bruce,
Thanks again for the assistance.
We are still not sure how to choose the correct layer when importing the new PSD via API call, as you mentioned above (new footage item (new path, correct layer chosen)).
We use the following command for import.
app.project.importFile(new ImportOptions(new File("sample.psd"));
There is only one parameter as part of this function here,
https://ae-scripting.docsforadobe.dev/general/project.html#project-importfile
Thanks.