Skip to main content
Participant
October 13, 2017
Question

Can Extendscript see if an effect is missing?

  • October 13, 2017
  • 1 reply
  • 979 views

My coworkers asked me to write a script that finds which layers have missing effects. I can search through every layer > every comp > Effects property > return every effect. I was hoping the name value would match how it's displayed in the timeline (e.g., "Missing: Edge Blur"), but it just displays the effect's name ("Edge Blur"). Is there any property that would return a value that would tell you whether the effect is missing or not?

This topic has been closed for replies.

1 reply

Tomas Sinkunas
Legend
October 13, 2017

One way to go about it is to collect all installed effects and then loop through to see if effects in question is in the array;

var effectInQuesstion = "ADBE Blend";

var installedEffects = getInstalledEffects();

if (contains(installedEffects, effectInQuesstion)) {

    alert("Effect " + effectInQuesstion + " is installed");

} else {

    alert("Effect " + effectInQuesstion + " is not installed");

}

function getInstalledEffects() {

    var installedEffects = [];

    for (var i = 0, il = app.effects.length; i < il; i ++) {

        installedEffects.push(app.effects.matchName);

    }

    return installedEffects;

}

function contains(array, string) {

    for (var i = 0, il = array.length; i < il; i ++) {

        if (array === string) {

            return true;

        }

    }

    return false;

}

Participant
October 13, 2017

Thanks for the reply Tomas, but I'm not sure if this solution will work. After Effects lists the missing effects in app.effects. Interestingly, it lists them even when I open a new project that doesn't use the missing effects. It looks like app.effects keeps a list of every effect that your AE installation has encountered, even the missing ones.

According to the documentation, objects under app.effects have 4 properties you can call: displayName, matchName, category, and version. The names obviously won't help you determine if something is missing.  Missing effects don't have a category, but neither do presets or effects that are created from outside of the Effects & Presets menu (e.g., DUIK effects). Missing effects have a version number of 0.0x0, but so do a lot of third-party effects. So I don't see how any of those will help.

However, I did come across this script (pt_EffectSearch 3) which is able to distinguish missing effects, so there has to be a solution somewhere.

Participant
June 5, 2022

Hey, are there any updates or ideas how to get the missing effects?