• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Dec 11, 2018 Dec 11, 2018

Copy link to clipboard

Copied

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!

TOPICS
Expressions

Views

335

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 11, 2018 Dec 11, 2018

I think this will do what you want:

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

Dan

Votes

Translate

Translate
Community Expert ,
Dec 11, 2018 Dec 11, 2018

Copy link to clipboard

Copied

I think this will do what you want:

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

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2018 Dec 13, 2018

Copy link to clipboard

Copied

LATEST

The simplest way might be:

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

 

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines