Highlighted

Can sourceRectAtTime be used for a single word in a text string?

Adobe Community Professional ,
Jul 29, 2019

Copy link to clipboard

Copied

I'd like to isolate a single word or a few words, to obtain their sourceRectAtTime props. The result should not interfere with their original position(s).

Possible with sourceRectAtTime or is there a better/alternative solution?

Topics

Expressions

Views

246

Likes

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

Can sourceRectAtTime be used for a single word in a text string?

Adobe Community Professional ,
Jul 29, 2019

Copy link to clipboard

Copied

I'd like to isolate a single word or a few words, to obtain their sourceRectAtTime props. The result should not interfere with their original position(s).

Possible with sourceRectAtTime or is there a better/alternative solution?

Topics

Expressions

Views

247

Likes

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
Guide ,
Jul 29, 2019

Copy link to clipboard

Copied

As far as I know, sourceRectAtTime only gives the whole containing text, it's not an array of sub-sourceRects.

But you can create your text with several text layers.

All those text parts can be "sicked together" using sourceRectAtTime, as well: every word calculates its position in dependence of the previous one. The first word is the only one which can be freely moved.

Pseudocode would look like:

prevpos = layer(index-1).transform.position;

prevrect = layer(index-1)... sourceRectAtTime();

myposition = prevpos + prevrect;

If you give us more details on what you want to achieve, there will be another way, for sure.

*Martin

Likes

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
Reply
Loading...
Adobe Community Professional ,
Jul 30, 2019

Copy link to clipboard

Copied

Thanks for the reply Martin. I'm looking for a way to create a textbox for a single word or two or three words in a sentence/paragraph. IOW, I don't need the textbox for the entire sentence/paragraph.

Likes

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
Reply
Loading...
Guide ,
Jul 30, 2019

Copy link to clipboard

Copied

If I understand correctly, you want to put a rectangle around a single word (or some more) and an along going paragraph.

Despite several text layers, the fastest solution I can think of is a shape layer, or any variations of this (like controlling the shape position and length with nulls).

Maybe the text animation selector brings some luck, where you link it's percentage values to world coordinates, which you can use by the shape layer for positioning and length.

If the words before and after the textbox are always the same and only the textbox-ones are changing, you can check sourceRectAtTime without your keyword - keep the value in mind and subtract this from the actual sentence with the keyword in it. This gives you the length of the word which should get the textbox. Position is the same in all cases.

But yeah, this is only a way for this very special situation.

Cheers,

Martin

Likes

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
Reply
Loading...
Adobe Community Professional ,
Sep 13, 2019

Copy link to clipboard

Copied

The first solution that comes to mind to do this on a single text layer is to add some sliders to modify the position and size of the text box created by sourceRecAtTime. That could give you some control in Premiere Pro if you are building a MOGRT. I don't know of any way to do this automatically using a single text layer. 

 

On the other hand, there may be a way for sourceRecAtTime to be modified by the value of range selectors in a text animator. I'd have to play with that for a while.

Likes

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
Reply
Loading...
Explorer ,
Aug 18, 2020

Copy link to clipboard

Copied

Hey Roland, did you ever find a workable solution for this? I'm up against the same challenge. Thanks

Likes

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
Reply
Loading...
Explorer ,
Aug 18, 2020

Copy link to clipboard

Copied

Eureka! I just solved it! Hit me up if anyone is interested.

Likes

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
Reply
Loading...
Guide ,
Aug 18, 2020

Copy link to clipboard

Copied

Can you share your solution, please?

*Martin

Likes

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
Reply
Loading...