Skip to main content
Inspiring
June 1, 2025
Question

Batch Change Composition Resolution/resolutionFactor (Script)

  • June 1, 2025
  • 2 replies
  • 285 views

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.");
    }
}

 

2 replies

thepixelsmith
Community Expert
Community Expert
June 5, 2025

What's the use case for this?

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

Inspiring
June 11, 2025
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.
Warren Heaton
Community Expert
Community Expert
June 4, 2025

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?