Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions sourceRectAtTime Paragraph text error on other machines

  • sourceRectAtTime Paragraph text error on other machines

    Posted by Ronan De lacy on January 29, 2019 at 11:01 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]))

    Kalleheikki Kannisto replied 7 years, 3 months ago 2 Members · 3 Replies
  • 3 Replies
  • Kalleheikki Kannisto

    January 30, 2019 at 4:28 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

  • Ronan De lacy

    January 31, 2019 at 10:18 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

  • Kalleheikki Kannisto

    January 31, 2019 at 2:58 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy