Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Combining two expressions

  • Combining two expressions

    Posted by Tom Szymanski on August 3, 2020 at 5:54 pm

    Hi,

    I feel like this is a really basic question, but for some reason I can’t quite get it to work. How do I combine these two separate expressions?

    The top ones is for having the source text’s content generated by the name of the comp:
    compName = thisComp.name;

    and this one draws the text’s style (primarily font) from a different layer:
    var parentStyle = thisComp.layer(“TEXT 3”).text.sourceText.style;

    The intent is to have the style pulled from a composition that acts as a control panel for the whole project, so all fo the other compositions will change when I change the control comp. But, additionally, to have the comp names generate the text itself so when I export stills the file names will match what the text says with only having to type it out. (I have to do like 2 hundred of these per project).

    I’m running CC 2020 on a Mac.

    Thanks!
    Tom


    compName = thisComp.name;
    var parentStyle = thisComp.layer("TEXT 3").text.sourceText.style;

    Tom Szymanski replied 5 years, 9 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 3, 2020 at 6:25 pm

    Try it this way:

    parentStyle = thisComp.layer(“TEXT 3”).text.sourceText.style;
    parentStyle.setText(thisComp.name)

    Dan

  • Tom Szymanski

    August 6, 2020 at 3:36 am

    Thank you Dan! I appreciate the help!

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