Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Copy Text Using Expressions

  • Copy Text Using Expressions

    Posted by Niels Otto on January 14, 2020 at 11:33 am

    Hi
    I’m trying to copy the source text of one layer, and making it into a wall of that name as a background element. I want to use expression to copy the text, to make it dynamic.

    I put the following code in as an expression on the source text of a “copy” layer, trying to copy the “Name” layer using a for loop:
    name = thisComp.layer("Name").text.sourceText
    for(i = 0; i < 5; i++) {
    name = name + "\r" + name
    }

    Which gives me this:

    My goal is this:

    Any help is appreciated

    Thanks

    name = thisComp.layer("Name").text.sourceText
    for(i = 0; i &lt; 5; i++) {
    name = name + "\r" + name
    }

    Niels Otto replied 6 years, 7 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    January 14, 2020 at 1:29 pm

    I don’t know of a better way than this. First is columns and second is rows

    (repeat(4)+"\n").repeat(3)

    Andrei
    My Envato portfolio.

  • Niels Otto

    January 14, 2020 at 3:18 pm

    This worked perfectly. Thank you!

    I ended up doing
    name = thisComp.layer("Name").text.sourceText + " ";
    (name.repeat(150)+"\n").repeat(60);

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