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

Connecting scale, and maintaining keyframes values

Explorer ,
Mar 18, 2023 Mar 18, 2023

Copy link to clipboard

Copied

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".

TOPICS
Expressions

Views

385

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 2 Correct answers

Community Expert , Mar 18, 2023 Mar 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]]

Votes

Translate

Translate
Community Expert , Mar 24, 2023 Mar 24, 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.

Votes

Translate

Translate
Community Expert ,
Mar 18, 2023 Mar 18, 2023

Copy link to clipboard

Copied

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]]

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
Explorer ,
Mar 24, 2023 Mar 24, 2023

Copy link to clipboard

Copied

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

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 ,
Mar 24, 2023 Mar 24, 2023

Copy link to clipboard

Copied

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.

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
Explorer ,
Apr 02, 2023 Apr 02, 2023

Copy link to clipboard

Copied

LATEST

Thank you 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