Copy link to clipboard
Copied
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: 
result:
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you Rick, you were right, I used different command, while copy is just 19
Find more inspiration, events, and resources on the new Adobe Community
Explore Now