Mailing List AE-List@media-motion.tv ? Message #52730
From: Salvador <s.zalvidea@gmail.com>
Subject: Re: [AE] Trigger opacity from markers AND use marker duration
Date: Fri, 7 Feb 2014 10:04:34 +0000
To: After Effects Mail List <AE-List@media-motion.tv>
Hi,

I had to tweak the expression a little to make it work correctly. Lloyd, the expression you gave me has one flaw : Opacity turns off as soon as the next marker is closer to the current marker, no matter its duration.

This seemed to work :

n = 0;

if (marker.numKeys > 0){
  n = marker.nearestKey(time).index;
  if (marker.key(n).time > time){
    n--;
  }
}

if (n == 0){
  0;
} else {
  (time >= marker.key(n).time && time <=  (marker.key(n).time + marker.key(n).duration))?100:0;
}


Thanks,


Salvador



On Mon, Feb 3, 2014 at 6:23 PM, Salvador <s.zalvidea@gmail.com> wrote:

On Mon, Feb 3, 2014 at 6:07 PM, Lloyd Alvarez <lists@aescripts.com> wrote:
myNearestKey = marker.nearestKey(time);
(myNearestKey.comment == "active" && time >= myNearestKey.time && time <= (myNearestKey.time + myNearestKey.duration))?100:0

Thx guys. It's perfect and actually very simple.

I forgot how reactive and helpful the AE community was.

 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster