Copy link to clipboard
Copied
When i work with a template, i have to import a lot of photos and the photos have different size. For each Photo Holder composition, i need to scale the photo to make it fit to comp, that keeps happening over and over on every photo, this make me fell sick.
I tried several scripts on aescripts.com, but all of them do same "Scale Composition" script, what was built in AE. So, anyone knows there is any script that can select multiple compositions and then choose "scale layers"?
I just wrote an Automation Blocks tool, which does exactly what you need:
Just select some comps and it will scale all layers contained in them to fit exactly into the comp.
The tool is now in the Community Library at this path:
Layer Properties/Scale/Scale All Layers In Selected Comps To Fit Into Comp
You can
1. download the xml of the tool here
2. install the free trial of Automation Blocks, load the xml of the tool into Automation Blocks and run it.
Copy link to clipboard
Copied
Create "aev_after.jsx" script under the folder with your images with the following content:
(function () {
try {
if (!app.project.selection.length || (!app.project.activeItem)) return !!alert("Please, open the composition and select layers");
app.beginUndoGroup("aev_after");
var importedProject = app.project.selection[app.project.selection.length - 1];
var myComp = app.project.activeItem;
var layer = myComp.selectedLayers[0];
app.executeCommand(2733); // fit to comp height
} catch (e) {
alert(e.toString() + "\nScript File: " + File.decode(e.fileName).replace(/^.*[\|\/]/, '') +
"\nFunction: " + arguments.callee.name +
"\nError on Line: " + e.line.toString());
} finally {
app.endUndoGroup();
}
})()
Then use Aeviewer to import files. It will automatically pick up this script and resize images
Copy link to clipboard
Copied
Thank you Alex. I work, but it have 2 problems:
1. It just work with single comp. I have to open a comp and run the script. I looking for the way that i can select multiple comps in Project panel (like Selected Comps Changer script)
2. This script only scale by height, it can't distinguish Width or Height. If the height of photo to high, the width of photo won't fit. (i found Dojo Expander script can do that).
Copy link to clipboard
Copied
So you need to open each of the selected comps and scale the first layer to fit the comp dimensions?
Or you need to scale all layers inside each comp?
Copy link to clipboard
Copied
Sorry Alex. Text seems to hard explain. Here is the video to explain what i want to say: https://www.youtube.com/watch?v=5lLxezJh-8k
Copy link to clipboard
Copied
I just wrote an Automation Blocks tool, which does exactly what you need:
Just select some comps and it will scale all layers contained in them to fit exactly into the comp.
The tool is now in the Community Library at this path:
Layer Properties/Scale/Scale All Layers In Selected Comps To Fit Into Comp
You can
1. download the xml of the tool here
2. install the free trial of Automation Blocks, load the xml of the tool into Automation Blocks and run it.