Mailing List AE-List@media-motion.tv ? Message #45563
From: Chris Zwar <chris@chriszwar.com>
Subject: Re: [AE] building a dynamic node-like effect in AE
Date: Fri, 31 Aug 2012 08:22:10 +1000
To: After Effects Mail List <AE-List@media-motion.tv>
On 31/08/2012, at 4:11 AM, Teddy Gage wrote:
The second issue I'm now having is that even though "this.inPoint" is supposed to start at the layer's inpoint, I still have to scrub the layer back in time to find out where it is actually starting the transition. Is there another pointer besides this.inPoint? I tried thisLayer.inPoint and it was still starting the transition back at the zero mark, even if the layer didn't start being visible until 30 seconds in. This could be because I split the layers (they are stills) and it's looking at the origin in point and not the actual in point in the composition. does that make any sense?

Hi,

Just to give you something different to think about, I usually build these sort of automated expressions to work in numbers of frames.  I tend to think of 25 - 50 frame transitions rather than 1 or 2 second transitions.  This code sets up a few basic variables that I use:

// in seconds //
start=thisLayer.inPoint;
end=thisLayer.outPoint;
dur=end-start;
count=time-start;

//in frames //
fps = 1 / thisComp.frameDuration;
start=start*fps;
end=end*fps;
dur=dur*fps;
count=count*fps;
count=clamp(count,0,dur); // optional //

[count]

If you want a variable that counts the number of frames into the layer it is, you need to subtract the layer's in-point from the composition time.  This might be the hint you're after.


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