Copy link to clipboard
Copied
I have a crap-load of layers that each need to be in their own precomp. Is there any way, script or plug-in, that would allow me to select a group of layers from the time line and make it so each of those layers get into their own precomp?
1 Correct answer
Sorry, missed a line when I pasted:
var moveAllAttributes = true;
var laycol = app.project.activeItem.layers;
// first cache the array of layer selections, starting at the bottom
var selectedLayers = new Array();
for (var i=laycol.length; i>0; i--) {
var thislayer = laycol;
if (thislayer.selected) selectedLayers.push(i);
}
// now precompose them individually
for (var s=0; s<selectedLayers.length; s++) {
var thislayer = laycol[selectedLayers];
var precomp_name = thislayer.name;
laycol.prec
Copy link to clipboard
Copied
Thank you so much for this.
Sorry, after my wife went to the hospital things got very crazy. I havent been able to mess with this stuff at all. But things are slowin' down a bit, so I'm gonna be able to start tinkering with it again. Sorry for vanishing. Your help is deeply appreciated!!
Copy link to clipboard
Copied
For some reason, this isn't creating the precomps. I saved this code into a .jsx file and ran it, but nothing happens.
Copy link to clipboard
Copied
Same here! I also tried running the script with KBar but nothing happens. This script would be super helpfull! Im thinking about reinstalling AE2019 to get this to work :'D
Let me know if you figure anythign out!
Copy link to clipboard
Copied
Could you please explain how I can use this? I'm a noob. Thanks
Copy link to clipboard
Copied
Hi!
Where I should place this expression? Can't figure it out.
Copy link to clipboard
Copied
Where does one paste this script into?
Copy link to clipboard
Copied
You can use QuickScript extension to quickly run a script:
var proj = app.project;
var thisComp = proj.activeItem;
var selectedLayers = thisComp.selectedLayers;
app.beginUndoGroup("undo");
for (var i = 0; i < selectedLayers.length; i++) {
thisComp.layers.precompose([selectedLayers[i].index], selectedLayers[i].name, true);
}
app.endUndoGroup();


-
- 1
- 2