• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Vector layer or shape layer's transform >scale to text soureRect

Explorer ,
Aug 09, 2018 Aug 09, 2018

Copy link to clipboard

Copied

Hi guys

How to connect shape layer's transform scale property to text soureRectAtTime to dynamically adjust with new text entry..

Note :

Not with size of shapelayer ..

I want to use  transform scale  only ..

Thank you

TOPICS
Expressions

Views

436

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 , Aug 09, 2018 Aug 09, 2018

Try this:

margin = 10;

txt = thisComp.layer("text");

r1 = txt.sourceRectAtTime(time,false);

r2 = sourceRectAtTime(time,false);

s = ((r1.width + 2*margin)/r2.width)*100;

[s,value[1]]

Dan

Votes

Translate

Translate
Community Expert ,
Aug 09, 2018 Aug 09, 2018

Copy link to clipboard

Copied

Try this:

margin = 10;

txt = thisComp.layer("text");

r1 = txt.sourceRectAtTime(time,false);

r2 = sourceRectAtTime(time,false);

s = ((r1.width + 2*margin)/r2.width)*100;

[s,value[1]]

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
Explorer ,
Aug 10, 2018 Aug 10, 2018

Copy link to clipboard

Copied

LATEST

Thanks Dan !

Although it's not perfectly scaling with text. I think I know that's the issue with anchor point position.

Let me check it tomorrow.

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