Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions sourceReactAtTime

  • sourceReactAtTime

  • Dominic Stoppani

    March 31, 2021 at 3:41 pm

    I have a project that I need to hand over to an editor – and was contemplating creating .mogrt for Premiere. I’ve created a comp with a single text layer of three lines (Name, Job title, Company) and two box shape layers behind that scale with the text using code from the Jake in Motion tut. BUT – when I create the .mogrt and drag the source text to the essential graphics panel you lose the text formatting or at least it only allows one type of formatting within that text box. For example – you can only have bold for all text lines. Hmmm. So my workaround is to have more than one text box – but how do I set those extra text boxes to scale the background boxes ?

  • Yoan Boisjoli

    March 31, 2021 at 7:28 pm

    Hi Dominic ! If your background box is a rectangular shape layer you could have a simple sourceRectAtTime() expression written in it.

    x = thisComp.layer("my Text Layer").sourceRectAtTime().width;

    y = thisComp.layer("my Text Layer").sourceRectAtTime().height;

    [x, y]

    If you want to have padding to the box you can a slider control and add the slider value to the x and y like this:

    x = thisComp.layer("my Text Layer").sourceRectAtTime().width;

    y = thisComp.layer("my Text Layer").sourceRectAtTime().height;

    pad = effect("Slider Control")("Slider");

    [x+pad, y+pad]


  • Yoan Boisjoli

    April 1, 2021 at 1:59 pm

    Oh by the way, you should check out these plugins:

    https://aescripts.com/pins-and-boxes/

    Smart Rekt – Ae Script

    They’re really useful !

    Cheers !

  • Dominic Stoppani

    May 8, 2021 at 11:10 am

    Hi Yoan, thanks for both posts. I have used the SourceRectAtTime expression and made it work in AE but my expression experience is limited. I need to separate the text as separate source text elements so that when I export to a .mogrt (which only allows ‘global’ changes within each text layer) I can have bold on one line and thin on another…. I think Pins and Boxes is the way to go for this – thanks so much for taking the time to get back to me. It’s been a life svaer.

    D

Viewing 1 - 4 of 4 posts

Log in to reply.

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