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

Match width of largest shape layer

Participant ,
Apr 15, 2023 Apr 15, 2023

Copy link to clipboard

Copied

Hello Folks,

I'm creating a responsive MOGRT where the background shape layers behind the Speaker Name and the Speaker Title text resize depending on the width of each text layer (See attached screen shot). 

However, what I need to accomplish now is how to make one shape layer match the width of the widest of the background shape layers. For example: IF the Speaker Name background shape (which is defined by the width of the Speaker Name text) is longer than the Speaker Title  THEN the Speaker Title background shape should resize to match the width of the Speaker Name background shape. I also would like to do the opposite so that at all times both backgrounds are the same width depending if Speaker Name or Speaker Title are the longest of the two. I'm using AE 2023 on Mac.

Any guidance on how to successfully accomplish this would be most appreciated. Or any other suggestions on how to accomplish the same effect are also appreciated.

TOPICS
How to

Views

340

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
LEGEND ,
Apr 15, 2023 Apr 15, 2023

Copy link to clipboard

Copied

Any tutorial involving sourceRectAtTime() will do. It only needs to be applied to both layers and a comparison with an if()else() statement added.

 

Mylenium

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
Participant ,
Apr 15, 2023 Apr 15, 2023

Copy link to clipboard

Copied

LATEST

Thanks for the prompt reply Mylenium. Yes, I had a feeling I needed an IF/ELSE statement but that's where I need more guidance. See attached AE project (updated now but same effects). As you see, I'm already using sourceRectAtTime() for resizing background shapes to text layers. 
Thanks again for any advice.

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