Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Targeting Layer name

  • Targeting Layer name

    Posted by Adam Levine on April 26, 2016 at 5:49 pm

    I’ve this little expression. As in the expression I want to change “End” time marker from different layer as set the “number” slider. But it doesn’t work. Can you please help me to fix what I did wrong.
    (Misc mean layer name) I’ve created several Misc layer such as Misc 1, Misc 2, …etc. And every layers have two Markers.

    Start = thisComp.layer("Misc 1").marker.key(1).time;

    var number = effect("Slider Control")(1).value;
    (Layer).name = Misc number;

    End = thisComp.layer(Layer).marker.key(2).time;

    x = linear(time, Start, End, 300, 2000);

    [x, value[1]]

    Adam Levine replied 10 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 26, 2016 at 6:21 pm

    Like this maybe:

    Start = thisComp.layer(“Misc 1”).marker.key(1).time;
    n = Math.round(effect(“Slider Control”)(1).value);
    End = thisComp.layer(“Misc ” + n).marker.key(2).time;
    x = linear(time, Start, End, 300, 2000);
    [x, value[1]]

    Dan

  • Adam Levine

    April 26, 2016 at 6:31 pm

    Thank you Master Dan. It works Perfect.
    Thank you so much again.

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