Skip to main content
Astrid Martirossian
Participant
December 11, 2018
Answered

How to make looped animation take twice as long in parented layer?

  • December 11, 2018
  • 1 reply
  • 497 views

Hi all,

In my composition I have two circles on separate layers, one large and one small.

The small circle has scale keyframes applied to it, which is then looped.

I want the large circle to mimic the scale animation of the small circle, which requires the following expression:

     thisComp.layer("SmallCircle").transform.scale

However, what I really want, is for the large circle to take twice as long to do the scale animation.

Say the small circle loop takes 2 seconds; then the large circle should do exactly the same, but in 4 seconds.

Of course when it's just two layers, I could just move the keyframes manually, but eventually I want to apply this effect to multiple layers and doing it manually would be a pain.

How can I achieve this by using expressions?

Many thanks in advance!

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

I think this will do what you want:

thisComp.layer("SmallCircle").transform.scale.valueAtTime(time/2)

Dan

1 reply

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
December 11, 2018

I think this will do what you want:

thisComp.layer("SmallCircle").transform.scale.valueAtTime(time/2)

Dan

Astrid Martirossian
Participant
December 13, 2018

Hi Dan Ebberts,

Thank you for your reply!

Although this does indeed stretch the time duration of the transformation, it also seems to scale the large circle tot the size of the small circle. The large circle is 1.5 larger than the small circle, which is 100% in size (so initial scaling of large circle is 150,150), but once I apply the expression, it shrinks back to 100,100.

How do I avoid this problem?

Dan Ebberts
Community Expert
Community Expert
December 13, 2018

The simplest way might be:

thisComp.layer("SmallCircle").transform.scale.valueAtTime(time/2)*1.5

 

Dan