Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects is there something like this in after effects??

  • is there something like this in after effects??

    Posted by Taha Arrabe on December 21, 2021 at 5:58 pm

    Hi,
    I can’t explain my problem perfectly.
    Look at the number 2 in the attached picture.
    I need a way to change this number depending on my layer name or any variation.
    For Example:
    if my layer name is 4 then the fullapperance variation must be:
    thisComp.layer(“Timing”).effect(“Start in (Frame) Picture 4”)(“Slider”);
    if my layer name is 7 then the fullapperance variation must be:thisComp.layer(“Timing”).effect(“Start in (Frame) Picture 7”)(“Slider”);
    can I do something like this in after effects???

    Taha Arrabe replied 4 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Walter Soyka

    December 21, 2021 at 8:14 pm

    The effect name is just a string, so you can use Javascript’s string manipulation tools to build whatever you like.

    For example, if your layer name were “4”, this line should get you what you’re looking for:

    thisComp.layer(“Timing”).effect(“Start in (Frame) Picture " + thisLayer.name)(“Slider”); 

    Note that it’s a good practice to do some error-checking in your expression so an unexpected layer name doesn’t break everything.

  • Taha Arrabe

    December 21, 2021 at 8:28 pm

    Thank you, Walter Soyka.
    it worked very well!

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