Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Mask Opacity follow + delay

  • Mask Opacity follow + delay

    Posted by Jamie Wood on April 19, 2016 at 9:47 am

    Hi,

    I have a layer with a lot of masks on that all need to flicker on individually using the Mask Opacity. I’ve been trying to work out how to get each consecutive mask to copy the first mask keyframes with an offset of 1 frame using a follow the leader style expression. I can’t work out how to use the number from the mask name instead of the layer index as you would if it was following another layer. Has anybody found a way to do this before?

    Would be much appreciative of not having to do this manually!

    Thanks

    Kalleheikki Kannisto replied 10 years ago 3 Members · 4 Replies
  • 4 Replies
  • Kalleheikki Kannisto

    April 19, 2016 at 2:15 pm

    Nope, no such property. You have to type in the name or index number of the preceding mask.

    This will work — if you change the mask number by hand for each mask — but it is cumulative, so probably not a good idea if you have a huge number of masks.

    mask(1).maskOpacity.valueAtTime(time-thisComp.frameDuration)

    A slightly better version would be

    mask(1).maskOpacity.valueAtTime(time-thisComp.frameDuration*1)

    wherein you change the last number (the multiplier) to the previous mask number.

  • Dan Ebberts

    April 19, 2016 at 4:30 pm

    This should work:

    myIdx = parseInt(thisProperty.propertyGroup(1).name.split(” “)[1],10);
    delay = thisComp.frameDuration;
    mask(“Mask 1”).maskOpacity.valueAtTime(time – (myIdx-1)*delay)

    Dan

  • Jamie Wood

    April 19, 2016 at 4:41 pm

    Thanks Dan. That’s some awesomeness right there!

  • Kalleheikki Kannisto

    April 21, 2016 at 1:28 pm

    I stand corrected 🙂

    I better read that expression language guide in full.

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