• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Re-linking of Photoshop file doesn't re-link to correct layer

Participant ,
Mar 04, 2021 Mar 04, 2021

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.

TOPICS
Error or problem , Expressions , Import and export , Scripting

Views

816

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 12, 2022 Oct 12, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 12, 2022 Oct 12, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 12, 2022 Oct 12, 2022

Copy link to clipboard

Copied

I think you're looking for ImportAsType.COMP, or ImportAsType.COMP_CROPPED_LAYERS...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 13, 2022 Oct 13, 2022

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'.

emamdev_0-1665678621776.png

Is there any command to do that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 13, 2022 Oct 13, 2022

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines