Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Adding a logo to a lower third mogrt template

  • Adding a logo to a lower third mogrt template

    Posted by Ken Latman on March 10, 2021 at 2:39 pm

    I am building a mogrt file in which I have a lower third that adjusts to the with of the text typed in. I would like to have the option to add a logo to the front of the name and have it adjust.

    I created a comp that uses a slider control to chose a logo as one part.

    I made that comp within the main comp have a checkbox on its opacity in order to simply turn it on in off.

    This is what I currently have for text position for the lower third:

    dName = thisComp.layer(“Name”).sourceRectAtTime(time).width;

    value+[dName,0];

    I thought I could do this to add the additional space but I am getting an error. I’m trying to learn expression but apparently I am missing something.

    if thisComp.layer(“Logos”).transform.opacity = 100

    then logoD=132

    else

    logoD=0;

    dName = thisComp.layer(“Name”).sourceRectAtTime(time).width;

    value+[logoD+dName,0];

    Thanks for any help.

    Ken Latman replied 5 years, 5 months ago 2 Members · 4 Replies
  • 4 Replies
  • Yoan Boisjoli

    March 10, 2021 at 3:04 pm

    Hi Ken, not sure exactly what you’re trying to accomplish with “value+[dName,0];”.

    For the second part (the conditional statement), this is how you should write it:

    if(thisComp("Logos").transform.opacity == 100){ 132; }else{0;}

    If I may recommend a very useful plugin, you should check out Pins and Boxes (link) I use it for almost every mogrt that I do, especially lower thirds.

  • Ken Latman

    March 10, 2021 at 3:34 pm

    Thank you Yoan.

    After thinking about it for a bit maybe I can explain the situation a little better.

    I have one layer in which I have my source text I want to have the user change.
    This is the “Name” layer

    I next have a layer holding a composition that is a width of 132 px. “Logos”. It’s opacity is being controlled by a checkbox.

    And finally I have a layer that has background art for the both the Name layer and the comp layer.

    I want the current position of the Name layer to move 132 px in if the Logo’s layer is on. If the logo layer is off then don’t move.

    The background art layer moves based on the length of the Name layer so it would have to move 132 px if the logo layer is on.

  • Yoan Boisjoli

    March 10, 2021 at 3:45 pm

    Ok! So if I understand correctly, you if the logo is “on” then the text needs to give space to the logo and be re-positioned 132px to the right?

    so in position of the text layer you’ll need something like this:

    logoWidth = thisComp.layer("Logos").sourceRectAtTime().width; //this gets the width of the logo layer

    logoOpacity = thisComp.layer("Logos").transform.opacity;

    if(logoOpacity == 100){

    [value[0]+logoWidth, value[1]]; //this tells the X pos to move the distance of the lenght of the logo to the right

    }else{

    [value[0], value[1]]; //

    };


  • Ken Latman

    March 10, 2021 at 4:16 pm

    Thank you so much Yoan especially for spelling out what is going on.

    Really appreciate it.

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