Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Markers call animations

  • Markers call animations

  • Melissa Franch

    December 2, 2022 at 1:58 pm

    Hi! I have a composition with many buttons (I don’t want precompositions). But all the buttons animate the same. I have used a null that has the animation I want on the button scale and right now each button has on the scale property:

    var delay = 1//each has a differnt delay;

    thisComp.layer(“ANIM BUTTON”).transform.scale.valueAtTime(time – delay)

    But what I would really like is to make different animations in the null that I have the animation, put markers like Anim In, Anim Out, Anim special, etc.
    And that by putting markers on the button layers with these same names, they would have those animations. I have seen that it is done in the timeremap with precompositions, but I have not found anything for the properties of the layers without precomposition. That a marker calls another from another layer and launches the animation that the other layer has.

  • Dan Ebberts

    December 2, 2022 at 2:05 pm

    Sorry, I posted in the wrong thread. I’ll be back…

  • Dan Ebberts

    December 2, 2022 at 4:46 pm

    This might be overkill, but it might give you some ideas:

    http://www.motionscript.com/design-guide/marker-sync.html

  • Melissa Franch

    December 5, 2022 at 7:23 am

    Hello dan!
    I had already seen your post, but they asked me not to have precompositions, and since I can’t put the programming in the timeremap, the code won’t be reused.

  • Dan Ebberts

    December 5, 2022 at 7:52 pm

    Ah yes. So if you just wanted to map the scale property actions of your button markers to the scale property marker animations on your null, you’d to need to modify it to something like this:

    action = thisComp.layer("ANIM BUTTON");
    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n--;
    }
    }
    if (n == 0){
    curT = 0;
    }else{
    m = marker.key(n);
    myComment = m.comment;
    t = time - m.time;
    try{
    actMarker = action.marker.key(myComment);
    if (action.marker.numKeys > actMarker.index){
    tMax = action.marker.key(actMarker.index + 1).time - actMarker.time - thisComp.frameDuration;
    }else{
    tMax = action.outPoint - actMarker.time;
    }
    t = Math.min(t, tMax);
    curT = actMarker.time + t;
    }catch (err){
    curT = 0;
    }
    }
    action.scale.valueAtTime(curT)
  • Melissa Franch

    December 9, 2022 at 9:30 am

    Wow! It works perfect in property scale! Thanks!

    But don’t work in property color effect Fill. 🙁

  • Dan Ebberts

    December 9, 2022 at 5:30 pm

    For fill color, you should be able to just change the last line to this:

    action.effect("Fill")("Color").valueAtTime(curT)
  • Melissa Franch

    December 12, 2022 at 1:07 pm

    Auch! I’m silly!

    Works perfect, but I realized that if I have two properties that I want to animate, like scale and color, by putting the two markers almost next to each other to call the animations, the second marker stops the first. This is too complicated for me! grgrgrgr

Viewing 1 - 8 of 8 posts

Log in to reply.

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