ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

AE CC 12.2 - Text Paragraph dimensions, How to retrieve them with script ?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Shai Benshoshan
AE CC 12.2 - Text Paragraph dimensions, How to retrieve them with script ?
on Apr 2, 2018 at 7:32:44 am

I am trying to get the width and height of a paragraph text box. cc_2015.
I can get the layer's scale, or "undefined".
Thank you :)

var myTextLayer = app.project.item(229).layer("text_segment 06").property("Transform").property("Scale");

var myInfoText = myTextLayer.width;

alert(myInfoText);


Return to posts index

Andrei Popa
Re: AE CC 12.2 - Text Paragraph dimensions, How to retrieve them with script ?
on Apr 2, 2018 at 1:35:50 pm

I think this was posted before. I think what you are looking for is
myTextLayer.sourceRectAtTime(time,false).width

Andrei
My Envato portfolio.


Return to posts index

Shai Benshoshan
Re: AE CC 12.2 - Text Paragraph dimensions, How to retrieve them with script ?
on Apr 3, 2018 at 8:39:17 am

thanks;
Not Working on CC12 ( function undefined ) ;


Return to posts index


Andrei Popa
Re: AE CC 12.2 - Text Paragraph dimensions, How to retrieve them with script ?
on Apr 3, 2018 at 8:46:46 am

Well, it was introduced in cc13. I don't know of any other way. Sorry for the missunderstanding.

Andrei
My Envato portfolio.


Return to posts index

Shai Benshoshan
Re: AE CC 12.2 - Text Paragraph dimensions, How to retrieve them with script ?
on Apr 3, 2018 at 2:47:57 pm

Found the answer :

var t = app.project.item(49).layer("text_001").property("Text").property("Source Text");
var e = t.value;
var width = e.boxTextSize[0];
var height = e.boxTextSize[1];

thanks for your time ;
shai


Return to posts index

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