Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions If/Else expression referencing contents of thisComp.ame

  • If/Else expression referencing contents of thisComp.ame

    Posted by Sami Bayley on November 10, 2021 at 11:30 am

    I have a bunch of comps, and certain comps require different icons. Instead of manually going in and changing each icon for the specific comp, I’d to just drag all the icons into every comp and reference the contents of the comp name.

    Theres video’s per section, every section has 3 video’s and each section has its own icon.

    For one section of video’s, comp names are: Careful Close Mindset, Careful Close Approach, Careful Close Skill.

    I’d like to ask after effects “If this comp name contains these words, do this”. Is there a way to do that?

    So the idea/expression I’d like on opacity is as follows;

    if (thisComp.name [not sure what to put here] “Careful Close”) {100}

    else {0}

    Thanks in advance!

    Andrei Popa replied 4 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Andrei Popa

    November 10, 2021 at 4:09 pm

    Hi Sami.

    I think what you need is this:

    if (thisComp.name.indexOf("Careful Close") != -1) {100}
    else {0}

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