FORUMS: list search recent posts

Mask Opacity follow + delay

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jamie Wood
Mask Opacity follow + delay
on Apr 19, 2016 at 9:47:57 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


Return to posts index

Kalle Kannisto
Re: Mask Opacity follow + delay
on Apr 19, 2016 at 2:15:09 pm
Last Edited By Kalle Kannisto on Apr 19, 2016 at 2:18:18 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.


Return to posts index


Dan Ebberts
Re: Mask Opacity follow + delay
on Apr 19, 2016 at 4:30:25 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



Return to posts index


Jamie Wood
Re: Mask Opacity follow + delay
on Apr 19, 2016 at 4:41:01 pm

Thanks Dan. That's some awesomeness right there!


Return to posts index

Kalle Kannisto
Re: Mask Opacity follow + delay
on Apr 21, 2016 at 1:28:27 pm

I stand corrected :)

I better read that expression language guide in full.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]