Skip to main content
Participant
February 23, 2018
Question

Make 2nd keyframe of a property the value of a different property

  • February 23, 2018
  • 1 reply
  • 370 views

Hey hey,

Was wondering if there is a way you can tie a specific keyframe to the value of another layers property?

I have this flat map of earth, with 3D position on, and I want make a simple camera move going from total world view and zoom in on a specific city. This city gets it's location from a 3D null (where other precomps, text and info is attached). And this map is something I need to version 50+ times. So i figured, if I know I want the cam position to end (= the 2nd keyframe) on the city's 3D position, is there an expression to tie that second keyframe to the city's 3D position (which does not have any keyframes).

Of course I could just copy paste it in manually, but I have finally reached a poitn where it's almost fully automated, based on expressions and a few expression controls. So my requests is also just out of general curiosity and further learning.

Any ideas?     

This topic has been closed for replies.

1 reply

Mathias Moehl
Community Expert
Community Expert
February 23, 2018

You could use my Expression Timeline to apply a simple link expression (which you can create with the pick whip) only to a certain range of time. Expression Timeline can also transition from the keyframed values to the expression value. But this transition is always a simple, linear one. So it depends on whether you need more advanced easing or not, whether this is good enough for you.

Expression Timeline 2 - aescripts.com

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
rob_kj
Participant
February 26, 2018

That's a mighty fine plugin you got there

The project I'm working on needs to be compatible with any of the 20+ computers connected across the country, and for that purpose, it would probably be better if it was possible to do with just expressions. If not, then we'll just do it by hand As I said, it's not a need-to-have thing, it's more of a nice-to-have thing

I know you can link the position of a layer to the second keyframe of another layer's position by using:

y = 540;

s = thisComp.layer(Your Leader);

x = s.valueAtTime(s.key(s.numKeys).time)[0];

[x,y]

But I can't figure out how to reverse that, so the second keyframe get's linked to a static position.