ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

sourceRectAtTime Paragraph text error on other machines

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ronan De Lacy
sourceRectAtTime Paragraph text error on other machines
on Jan 29, 2019 at 11:01:17 am

Hello all,

I've ran in to a little problem with the sourceRectAtTime expression. I'm creating a messages template using the essential graphics panel. The expression itself is working perfectly on my machine, but when I try to open the project on another machine, the bounding box takes the size of the paragraph text bounds, not of the actual inputted text. (see screen shot below)

Any ideas on why there's a mismatch? Both machines are on the same version of AE - AE CC V 15.0.0.

Any help greatly appreciated.

Many thanks,
Ronan

Machine 1


Machine 2


Expressions on rectangle bounding box:
Size:
margin=26.2;
s=thisComp.layer("message 1");

x=s.sourceRectAtTime(time-s.inPoint,true).width;

y=s.sourceRectAtTime(time-s.inPoint,true).height;

box_width=x+margin*3;
box_height=y+margin*2.2;

[box_width,box_height]

Position:
content("Rectangle 1").content("Rectangle Path 1").size/2/-1

Anchor point:
L = thisComp.layer("box_layer 20");
r = L.sourceRectAtTime(time,false);
fromComp(L.toComp([r.left+r.width,r.top]))

Expression on text layer:
Anchor point:

L = thisComp.layer("message 1");
r = L.sourceRectAtTime(time,false);
fromComp(L.toComp([r.left+r.width,r.top]))


Return to posts index

Kalleheikki Kannisto
Re: sourceRectAtTime Paragraph text error on other machines
on Jan 30, 2019 at 4:28:03 pm

Does changing "true" to false" on the lines defining x and y do anything for you? The current implementation of sourceRectAtTime() has two options, inner and outer bounds, controlled (I believe) by that value.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Ronan De Lacy
Re: sourceRectAtTime Paragraph text error on other machines
on Jan 31, 2019 at 10:18:59 am

Hi Kalleheikki,

Sorry for my delay in reply, I didn't see your comment until now. Changing the x and y to false worked. I'm curious, however, as to why the expression with true o the x and y was working on the machine that I created the initial project file, and with the same expression applied, didn't on other machines. Any thoughts on why that happened?

Many thanks,
Ronan


Return to posts index


Kalleheikki Kannisto
Re: sourceRectAtTime Paragraph text error on other machines
on Jan 31, 2019 at 2:58:07 pm

If you only have one version of AE on the computer where it does work, I have no idea. if you have two, it might have opened in a different version...?

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

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