// ISO_ChangeAlphaToIgnore.jsx
// Artist: https://www.jasonfletcher.info/
// Code generated by ChatGPT-4o
// Date: May 23, 2025
// Description: This After Effects script will set “Alpha: Ignore” (within the Interpret Footage window) for all the selected footage items in the Project window.

{
    var proj = app.project;
    var selectedItems = proj.selection;
    var changedCount = 0;

    app.beginUndoGroup("Set Alpha to Ignore");

    for (var i = 0; i < selectedItems.length; i++) {
        var item = selectedItems[i];

        if (item instanceof FootageItem) {
            var interp = item.mainSource;

            if (interp instanceof FileSource) {
                interp.alphaMode = AlphaMode.IGNORE;
                changedCount++;
            }
        }
    }

    app.endUndoGroup();

    alert(
        "Set 'Alpha: Ignore' for " +
        changedCount +
        " selected footage item" +
        (changedCount === 1 ? "" : "s")
    );
}