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

Bounding a paragraph to a shape

New Here ,
Feb 09, 2024 Feb 09, 2024

Copy link to clipboard

Copied

I am working on creating a AE template that will pull information from an Excel spreadsheet and place that information in various locations within the comp. One of the cells in Excel will be a comments section and this section can get lengthy at times. So, what I am trying to do is setup a text box that is W:1300pix by H:720pix, and when the texts reaches W:1300pix it will break and start a new line below it and when it reaches the max height of 720pix it will auto scale down so that the paragraph will fit inside the box. 

 

The text box works great with adding the line breaks but as soon as the texts go past the max height it gets cut off. Is there an expression that I can add to the text box or source text that when the paragraph reaches it max height it will auto scale down? 

TOPICS
Expressions , How to , Scripting

Views

92

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 ,
Feb 10, 2024 Feb 10, 2024

Copy link to clipboard

Copied

The usual sourceRectAtTime() stuff will work, though it's notoriously unreliable with paragraph text due to the same limitations you already experience. It might be better to use line text or handle the overflow in Excel. Either way, you will need a dummy text layer to measure what the full text would be and then do whatever scaling or reformatting.

 

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
Adobe Employee ,
Feb 11, 2024 Feb 11, 2024

Copy link to clipboard

Copied

LATEST

This might be useful to you, or at least to try and see if it addresses part of your workflow.

 

https://community.adobe.com/t5/after-effects-beta-discussions/new-text-box-options-available-in-scri...

 

TextDocument.boxAutoFitPolicy

 

It only grows the bottom/height at this point, so not super flexible, but sounds like it might work here for your case.

 

The functionality is only exposed in Scripting, and in the Beta.

 

Douglas Waterfall

After Effects Engineering

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