Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression to list effects used

  • expression to list effects used

    Posted by Jim Arco on September 23, 2009 at 3:29 am

    I am a real novice with it comes to expressions.

    We’re looking at a project that would involve dozens of clips each modified in several different ways inside of AE. Ideally, the end-product would show the video (probably letterbox) with the original timecode of the clip and the effects that are used on that specific clip listed as text in the “margins.” (Even more ideally, it would be available as a subtitle file for the DVD.)

    Trying to type a list of effects in text layers for hundreds of clips seems like it would be prone to errors (and not much fun.)

    Are there expressions that “know” what other effects are being used on that clip?

    Dan Ebberts
    replied 9 years, 8 months ago
    3 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    September 23, 2009 at 1:24 pm

    This should get you started. You can apply this to the source text of a text layer and it will list the effects applied to the layer (other than itself) that’s currently visible in the comp.

    txt = “”;
    for (i = 1; i <= thisComp.numLayers; i++){ if (i == index) continue; L = thisComp.layer(i); if (! (L.hasVideo && L.active)) continue; for (j = 1; j<= L("Effects").numProperties; j++){ txt += L("Effects").property(j).name + "\r"; } break; } txt Dan

  • Jim Arco

    September 24, 2009 at 1:59 am

    Thanks so much for the quick response, Dan.

    When I paste this into the expression field for a text layer, I get an AE warning:

    “Bad method arguments: can’t look for property by name in group ‘Effects’. You must use (index) Expression disabled.
    Error occurred at line 7.”

    Like I said, I’m a real novice when it comes to expressions. As I understand this, its telling me that I can’t use ‘name’ in the line
    txt += L(“Effects”).property(j).name + “\r”;

    I’ve tried a few other variations, but get the same error message. I am using AE CS4 on a PC, if it makes any difference.

  • Dan Ebberts

    September 24, 2009 at 2:07 am

    Try it this way:

    txt = “”;
    for (i = 1; i <= thisComp.numLayers; i++){ if (i == index) continue; L = thisComp.layer(i); if (! (L.hasVideo && L.active)) continue; for (j = 1; j<= L("Effects").numProperties; j++){ txt += L("Effects")(j).name + "\r"; } break; } txt Dan

  • Jim Arco

    September 24, 2009 at 2:09 am

    WOW !!!!

    That did it! Again, many thanks for your help. You have save me 30-40 hours of work.

    Jim

  • Waqas Baber

    March 13, 2015 at 6:56 pm

    hi, Hope you will be fine, can you please tell me where exactly you use the above expression???? waiting for your reply

  • Dan Ebberts

    March 13, 2015 at 7:19 pm

    You would use it on the sourceText property of a text layer.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy