Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Check if Effect is Installed?

$
0
0

So I'm automating a lot of complex tasks involving RevisionFX's Twixtor plugin, and I'm testing to see if twixtor is even installed in the first place. It works just fine but it's very slow since I'm currently iterating over every single installed effect and checking to see if twixtor shows up. Is there a less expensive way to do this that would throw an error before the main part of the script runs? I could add some error handling in the middle of the script but I want to check before the dialog box appears. Here's how I'm currently doing it..

 

    function checkForInstalledEffect() {

            var installed = false;

            for (i in app.effects) {

                    if (app.effects[i].displayName == "Twixtor") {

                                installed = true;

                                break;

                     }

            }

            return installed

   }

 

then later on i do:

 

     if (!checkForInstalledEffect()) {

          alert("Twixtor not installed!")

     }

 

I'm a terrible programmer so I'm sure i'm doing this in the most inefficient way possible. Thanks for the help!

 

Robert


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>