Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: ForumAE BasicsAE ExpressionsTutorialsArticlesPodcastsMotion GraphicsTrainingCinema 4D

locking keyframes to markers ?

Cow Forums : Adobe After Effects Expressions
cow
locking keyframes to markers ?
by alex dinnin on Jul 24, 2008 at 3:07:08 pm

Hey everyone,

Is there a way I can lock keyframes to a marker ???

I have loads of maps to make, all the same format.. however the keyframes have to move.. eg map 01 has layer 01, 02 & 05 have scale, opacity and position keyframes at 12 & 120, and on map 02 they have the same keyframes but at 15 & 97.

What would be great. would be to constrain all the keyframes to markers.. so at every map.. instead of having to twiddle down each layer.. I could just move two markers ??

is this even possible, or am I being a bit optimistic ??

thanks in advance

Alex

Respond to this post     Return to posts index

cow
Re: locking keyframes to markers ?
by matthew tully on Jul 24, 2008 at 4:39:49 pm

you should make a null and attach as many sliders as you have properties to change each time, this way you only have to edit one set of keyframes.

Not sure if this helps, could you explain the problem a little more?

Respond to this post     Return to posts index

cow
Re: locking keyframes to markers ?
by Dan Ebberts on Jul 24, 2008 at 4:44:38 pm

Assumptions: Each map is its own comp; the map comps are all in another comp named "master"; there are exactly two linear keyframes for each keyframed property; the markers are applied to the map comp layers in the master comp; the map comp layers in the master comp have not been renamed. Then, applying this expression to each keyframed property should do the trick:

L = comp("master").layer(thisComp.name);
if ((L.marker.numKeys > 1) (&& numKeys > 1)){
t1 = L.marker.key(1).time;
t2 = L.marker.key(2).time;
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(time,t1,t2,v1,v2)
}else{
value
}

If your setup is different, the expression will need to be revised. :-)

Dan



Respond to this post     Return to posts index


cow
Re: locking keyframes to markers ?
by alex dinnin on Jul 24, 2008 at 8:52:06 pm

ok.. Thanks for the help so far.. but I don't think I really explained myself.
I have a big resolution map, which I have a route going from A to B, using stroke. I have a triangle following the stroke (copied the path onto the position) to look like a pointer. As the Pointer gets near to B the name appears. I then precomp this into a Pal 16:9 comp which I animate the position.

this is basically the run down.

frame 10 : stroke starts, triangle starts.

frame 100 : place name opacity 0%

frame 110 : place name opacity 100%, end stroke.

the durations of the maps change.. some are 90 frames some are 120 etc etc.. however the setup is always the same. The first keyframe is at 10 frames.. What I want to be able to do is have a marker which the end two keyframes follow.

I have about 80 of these maps to do, so it would be fantastic if I could just move two end markers.. and the end keyframes follow..

I hope this makes a bit more sense..

thanks for your help already

regards

Alex







Respond to this post     Return to posts index

cow
Re: locking keyframes to markers ?
by Dan Ebberts on Jul 24, 2008 at 9:40:43 pm

OK - now assume that you have a layer in the comp named "Layer With Marker", where the marker is. Then try this:

L = thisComp.layer("Layer With Marker");
if ((L.marker.numKeys > 0) && (numKeys > 1)){
t1 = key(1).time;
t2 = L.marker.key(1).time;
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(time,t1,t2,v1,v2)
}else{
value
}

Dan



Respond to this post     Return to posts index

cow
Re: locking keyframes to markers ?
by alex dinnin on Jul 25, 2008 at 11:26:39 am

Hi Dan,

Thank you so much.. It took me a while to work out how it was working.. and then a bit longer to tweak it..

But it works like a charm now.. thanks very much for you help

Alex



Respond to this post     Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSLIBRARYPODCASTSBLOGSMAGAZINESERVICESNEWSLETTERSNEWSSTOREEVENTS

© CreativeCOW.net All rights are reserved.

[Top]