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

Box surrounding text with bounding box

Community Beginner ,
Aug 07, 2018 Aug 07, 2018

Hi all,

Can someone please help me. I want to create a text layer (with a bounding box) and have a regular box shape (using RectAtTime script) behind it reshape to match the height/width of the text. I can get it to work with text layers that 'don't' have a bounding box.

QUESTION.jpg

I have also added script so that the text will vertically center itself. Is there an easier way? I don't know how Adobe haven't added this as a standard feature by now.

Thanks in advance for any help.

David.

3.9K
Translate
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 08, 2018 Aug 08, 2018

There are ways to do this sort of thing, but they involve very interesting expression stuff.

I can certainly understand wanting and easy way to do that sort of thing. Please check and see if someone has made a request like this in the User Voice page and upvote it. If nobody has, make a feature request of your own! After Effects: Hot (725 ideas) – Adobe video & audio apps

Translate
LEGEND ,
Aug 08, 2018 Aug 08, 2018

I don't know how Adobe haven't added this as a standard feature by now.

The whole point of  paragraph text is to align the text relative to a user-defined bounding box, which ultimately is totally arbitrary depending on the formatting. I fail to see why it should be any different. As far as I'm concerned you are simply usingh a wrong approach and in your image I see nothing that couldn't be done with normal line-based text, text animators and possibly pre-composing and effects.

Mylenium

Translate
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 Beginner ,
Aug 08, 2018 Aug 08, 2018

I think you missed my point. Perhaps I didn't explain myself well enough.

Firstly... We do a lot of copying and pasting text from Word into After Effects (long quotes). I am using a bounding text box so I don't have to adjust each line. I also want that text (either being 1 line or several lines typed) to vertically center dynamically in its position so I don't have to manually adjust it (position) each time. After Effects does 'not' let you do this (without scripting).

I then want a self-resizing box to sit behind that text (being the width/height of that text paragraph)

As I mentioned, I can get that work work with a standard text layer, but as soon as I use a bounding box, the self-resizing box only sees the width/height of the bounding box, and not the actual text within the bounding box..

I hope that made more sense.

This is what I want to create:

QUESTION2.jpg

..but I simply want to paste some text in to a text layer, it constrains and the box automatically reshapes to the length/height of that text.

Thanks.

Cheers,

David

Translate
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 ,
Aug 08, 2018 Aug 08, 2018

I still dont get why you insist on using paragraph text. None of what you describe would be un-doable using normal line text with e.g. vertical centering merely being a matter of using a text animator set to Line mode and a simple expression calculating the number of lines, give or take the initial tweaking when creating the template. I'm afraid you have locked yourself into a specific way of thinking and are working against the program, not with it, so of course what you wanbt will be difficult or impossible to implement.

Mylenium

Translate
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 Beginner ,
Aug 08, 2018 Aug 08, 2018

Mylenium. I'm sorry, but I don't think you understand my issue. Your suggestion of a text animator is not a solution.

The bounding box is important to me as I don't want to have to break up the lines manually after pasting the text.

Translate
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 ,
Aug 08, 2018 Aug 08, 2018

There are ways to do this sort of thing, but they involve very interesting expression stuff.

I can certainly understand wanting and easy way to do that sort of thing. Please check and see if someone has made a request like this in the User Voice page and upvote it. If nobody has, make a feature request of your own! After Effects: Hot (725 ideas) – Adobe video & audio apps

Translate
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 Beginner ,
Aug 08, 2018 Aug 08, 2018

Thanks Szalam. As you mentioned, I'm sure there is some expression that can make it happen. I'll follow your advice and search around before making a feature request. Cheers, David.

Translate
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 Beginner ,
Jun 29, 2021 Jun 29, 2021

Hey,

I´m facing the same problem. do you have any solution yet?

Cheers,

Paul

Translate
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 Beginner ,
Jun 29, 2021 Jun 29, 2021
LATEST

Ah! I did. You just need to tell after effects to ignore the extends of the textlayer. 

 

w = thisComp.layer("Text").sourceRectAtTime(time,false).width;
h = thisComp.layer("Text").sourceRectAtTime(time,false).height;
[w,h]

Translate
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