ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Modify sourceRectAtTime Expression to Ignore a Specific Character

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Quest Rogers
Modify sourceRectAtTime Expression to Ignore a Specific Character
on Oct 3, 2017 at 5:52:06 pm
Last Edited By Quest Rogers on Oct 4, 2017 at 2:02:11 pm

Hello.

I'm wondering if someone can help me figure if it's possible to modify the expression below to ignore a specific character. This expression is applied to a rectangle's path size so that when text is typed a box increasing the visibility of the text is created behind it to the specific length of the line of text. When a comma is typed the box extends lower than I'd like and makes the text look as if it's not perfectly centered in the box. Basically I want the expression to resize to the length of the text without factoring any commas.

If anyone has any ideas I would appreciate any help.

Thanks.

x=thisComp.layer("Title").sourceRectAtTime().width+18;
y=thisComp.layer("Title").sourceRectAtTime().height+12;
[x,y]


Return to posts index

Paul Connors
Re: Modify sourceRectAtTime Expression to Ignore a Specific Character
on Oct 5, 2017 at 4:54:57 pm

This is a GREAT question. I have this exact issue from time to time and have just settled with it looking out of sorts. I would love to know the answer.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]