Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions that work in all languages, best practises

  • Expressions that work in all languages, best practises

    Posted by Terje Lundgren on November 6, 2024 at 6:50 am

    Hi everyone,

    I want to make sure these expressions work in all AE languages:

    comp("Comp 1").layer("myLayer")("Effects")("myCtrl 1")("Slider")
    comp("Comp 1").layer("myLayer")("Effects")("myCtrl 2")("Slider")

    Now, if all properties use matchNames, it looks like this:

    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")("ADBE Slider Control")("ADBE Slider Control-0001")
    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")("ADBE Slider Control")("ADBE Slider Control-0001")

    So they are basically identical and the second expression is not reached.

    Is the safest approach to use the index of the propertyGroup:

    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")(1)("ADBE Slider Control-0001")
    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")(2)("ADBE Slider Control-0001")

    Or are one allowed to use the name (not matchname) on the individual effects, like this:

    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")("myCtrl 1")("ADBE Slider Control-0001")
    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")("myCtrl 2")("ADBE Slider Control-0001")
    Terje Lundgren replied 2 months, 1 week ago 3 Members · 7 Replies
  • 7 Replies
  • Dan Ebberts

    November 6, 2024 at 8:49 pm

    I think it’s safe to use the name of anything that’s been re-named, so in your example I think you’d be OK using “myCtrl 1”.

  • Yoan Boisjoli

    November 6, 2024 at 8:54 pm

    What I do is hold ‘Alt’ while pickwhipping a property, which makes it universal by addressing the index. However, at the end of a project, when I need to make it available in any language, I use the script Expression Universalizer.

  • Terje Lundgren

    November 7, 2024 at 3:03 pm

    @Yoan Boisjoli Interesting. Your option produces the second line below.

    The “effect()” call will probably break, though, as I think it might translate to “effet()” in French.

    Expression Universalizer is a safe bet, but I want to understand the underlying principles.

    effect("myCtrl 1")("Slider")
    effect("myCtrl 1")(1)
    thisLayer("ADBE Effect Parade")("myCtrl 1")(1)
    thisLayer("ADBE Effect Parade")("myCtrl 1")("ADBE Slider Control-0001")

  • Terje Lundgren

    November 7, 2024 at 3:05 pm

    @Dan Ebberts: Thanks, that is promising.

    I guess I will have to install a foreign language version on a spare computer to be sure, though. 🙂

  • Terje Lundgren

    November 8, 2024 at 1:47 pm

    Ok, tested in Spanish language AE. Here are results for future reference and anyone interested:

    // English version (breaks in Spanish AE)
    comp("Comp 1").layer("myLayer")("Effects")("myCtrl 1")("Slider")


    // Spanish version 
    comp("Comp 1").layer("myLayer").effect("myCtrl 1")("Deslizador")

    // Works
    comp("Comp 1").layer("myLayer").effect("myCtrl 1")(1)

    // Also works
    comp("Comp 1").layer("myLayer")("ADBE Effect Parade")("myCtrl 1")("ADBE Slider Control-0001")
  • Yoan Boisjoli

    November 8, 2024 at 1:54 pm

    Yes, as you can see, the word “effect” is not changed. By holding “Alt” while dragging, or simply using the effect’s index, you make it universal. When I do this, the Expression Universalizer script doesn’t change it. I guess it recognizes that it’s already compatible.

    So in the Spanish version, it looks like this:

    // Native languagethisComp.layer("myLayer").effect("myCtrl 2")(1);
  • Terje Lundgren

    November 8, 2024 at 2:34 pm

    @Yoan Great. Thanks for confirming using the Expression Universalizer as well. 👍

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