Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Right aligned text – sourceRectAtTime

  • Right aligned text – sourceRectAtTime

    Posted by Lucy-rae Naylor on February 7, 2019 at 10:30 am

    First of all I’m not very versed in code, just know my way to get by..
    I have a lower third which I need to come on from the right, and be right aligned.

    For the left lower third I’ve just used..

    Size:
    “s =thisComp.layer(“Text Duplicate (No Effect)”);
    x = s.sourceRectAtTime(time-s.inPoint,true).width + 200;
    y = s.sourceRectAtTime(time-s.inPoint,true).height + 50;

    [x,y]”

    Position:
    “content(“Rectangle 1”).content(“Rectangle Path 1″).size/2”

    This works great for left, but I just can’t seem to work out how to make it work for right alignment?
    Any help would be greatly appreciated!

    Scott Mcgee replied 7 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Scott Mcgee

    February 8, 2019 at 2:15 pm

    Hey Lucy,

    Try this

    content(“Rectangle 1”).content(“Rectangle Path 1”).size/1

    I’d normally set my anchor point to achieve this rather than put it in the position of the shaper layer contents.

    so my anchor point would use this to do the exact same thing. Spent a few minutes looking at yours and daft as it sounds. Soon as you put /1 it works.

    r = sourceRectAtTime();
    [r.left + r.width, r.top]

    Hope that helps

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