Skip to main content
Inspiring
Jun 1, 2025 5:06 PM UTC
Question

Batch Change Composition Resolution/resolutionFactor (Script)

A tiny script to batch change the comp resolution setting for all selected project comps

 

{
    var userInput = prompt("Enter a resolution factor (e.g., 1 for full, 2 for half, 3 for third):", "1");
    var res = Math.floor(parseFloat(userInput));

    if (!isNaN(res) && res >= 1 && res <= 99) {
        app.beginUndoGroup("Set Comp Resolution");

        try {
            for (var i = 0; i < app.project.selection.length; i++) {
                var myComp = app.project.selection[i];
                if (myComp instanceof CompItem) {
                    myComp.resolutionFactor = [res, res];
                }
            }
        } catch (e) {
            alert("Error: " + e.toString());
        }

        app.endUndoGroup();
    } else {
        alert("Please enter a valid number between 1 and 99.");
    }
}

 

3 replies

thepixelsmith
Community Expert
Community Expert
Jun 5, 2025 12:35 PM UTC

What's the use case for this?

Wouldn't this be best handled as a Render Setting in the Render Queue or Media Encoder? 

Translate
Jerron Smith | www.thepixelsmith.com
Inspiring
Jun 11, 2025 8:49 AM UTC
Sure if you are using "best setting" preset in export you wouldn't need it. Personally I don't like having the comp resolution set to anything but "full" to eliminate any chance of having a reduced size export unintentionally.
Translate
Warren Heaton
Community Expert
Community Expert
Jun 4, 2025 11:22 PM UTC

Nice.  I'll give this a try.

Any chance you can write a version that changes the Composition Resolution for all Comps in the same stream?  That is, for any upstream (nested) or downstream (containing) Comps relative to the Comp currently in focus?

Translate