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

Scale layer in multiple compositions?

Community Beginner ,
Oct 31, 2023 Oct 31, 2023

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"?

TOPICS
How to , Scripting
889
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 31, 2023 Oct 31, 2023

I just wrote an Automation Blocks tool, which does exactly what you need:

 

Screenshot 2023-10-31 at 19.43.23.png

 

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.

Translate
Enthusiast ,
Oct 31, 2023 Oct 31, 2023

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

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
Community Beginner ,
Oct 31, 2023 Oct 31, 2023

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

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

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?

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
Community Beginner ,
Oct 31, 2023 Oct 31, 2023

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

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

I just wrote an Automation Blocks tool, which does exactly what you need:

 

Screenshot 2023-10-31 at 19.43.23.png

 

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.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
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