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 ??
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. :-)
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..