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

Copy/paste effects behave weird

Participant ,
Oct 30, 2023 Oct 30, 2023

Hi guys, I am trying to implement some simple copy-paste function to copy effects from one layer to another using executeCommnad in AE, however it doesn't paste keyframes and adds expressions to all properties 'baking' only one value if the keyframe was applied to a property, what can be the reason and the best way to achieve what I am trying to do? I feel I can go with standard copy/adding effects properties and settings the values for each property with keyframes, but I feel this can be done easier:

//save selected layers
    var reservedSelection = [];
    activeComp.selectedLayers.forEach(function (layer) {
      reservedSelection.push(layer);
    });

    //select the effect and copy it
    app.executeCommand(2004); //deselect all
    storageComp.openInViewer();
    var effects = storageComp.layer(1).property("ADBE Effect Parade");
    for (var i = 1; i <= effects.numProperties; i++) {
      effects.property(i).selected = true;
    }
    app.executeCommand(10313); //copy

    activeComp.openInViewer();
    //restore selection
    reservedSelection.forEach(function (layer) {
      layer.selected = true;
    });
    app.executeCommand(20); //paste

source: 

Screenshot 2023-10-31 at 02.26.23.png

result:

 Screenshot 2023-10-31 at 02.26.08.png

TOPICS
FAQ , How to
510
Translate
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

correct answers 1 Correct answer

Community Expert , Oct 30, 2023 Oct 30, 2023

It sounds like you are using Edit/Copy with Property Links. The expressions are normal. 

 

If you just want to copy and paste a layer, select the layer, press Ctrl/Cmnd + C, go to another comp, and press Ctrl/Cmnd + v. 

 

If you are copying in the same layer just select the layer and press Ctrl/Cmnd + d.

Translate
Community Expert ,
Oct 30, 2023 Oct 30, 2023

It sounds like you are using Edit/Copy with Property Links. The expressions are normal. 

 

If you just want to copy and paste a layer, select the layer, press Ctrl/Cmnd + C, go to another comp, and press Ctrl/Cmnd + v. 

 

If you are copying in the same layer just select the layer and press Ctrl/Cmnd + d.

Translate
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 31, 2023 Oct 31, 2023
LATEST

Thank you Rick, you were right, I used different command, while copy is just 19

Translate
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