Skip to main content
StefanStehlik
Inspiring
March 18, 2023
Answered

Connecting scale, and maintaining keyframes values

  • March 18, 2023
  • 1 reply
  • 808 views

I would like to connect the scale property of "Layer 1" to the second layer with this expression: thisComp.layer("Layer 2").transform.scale. Is there a way to maintain the value of the scale keyframes relative to the new scale of the "Layer 2".

This topic has been closed for replies.
Correct answer Dan Ebberts

I guess for rotation you could do this:

r = thisComp.layer("Layer 2").transform.rotation;
value + r

and this for opacity:

t = thisComp.layer("Layer 2").transform.opacity/100;
value*t

but postion is trickier. For position you need a reference point, and how you'd implement that would depend on exactly what you're looking for.

1 reply

Dan Ebberts
Community Expert
Community Expert
March 18, 2023

There's more than one way to interpret what you're asking for, but maybe like this:

s = thisComp.layer("Layer 2").transform.scale/100;
[value[0]*s[0],value[1]*s[1]]
StefanStehlik
Inspiring
March 24, 2023

Thanks Dan, this works great. How would you adapt this expression to position, rotation, and transparency, maintaining relative values?

StefanStehlik
Inspiring
April 2, 2023

I guess for rotation you could do this:

r = thisComp.layer("Layer 2").transform.rotation;
value + r

and this for opacity:

t = thisComp.layer("Layer 2").transform.opacity/100;
value*t

but postion is trickier. For position you need a reference point, and how you'd implement that would depend on exactly what you're looking for.


Thank you Dan