Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Repeat sourcetext from another layer

  • Repeat sourcetext from another layer

  • gray wilcox

    October 3, 2022 at 4:03 pm

    Hello! I’ve been trying to use this expression to repeat source text from another layer:

    My goal: to use the sourcetext from a main Build Comp and repeat it in X & Y using the following formula:

    the original:

    X = effect(“X”)(“Slider”);
    Y = effect(“Y”)(“Slider”);
    (repeat(X) + “\n”).repeat(Y)

    and here’s my attempt:

    my abomination:

    X = effect(“X”)(“Slider”);
    Y = effect(“Y”)(“Slider”);

    comp(“Build Comp”).layer(“ARTIST”).text.sourceText.repeat(X) + (“\n”).repeat(Y);

    I’d also like to add a space between the repeated words, if possible.

    Can anyone see where i’m going wrong? With my above abomination code, it will repeat in X but not Y.

  • Dan Ebberts

    October 3, 2022 at 4:46 pm

    You just need to move a left paren in the last line, like this:

    (comp("Build Comp").layer("ARTIST").text.sourceText.repeat(X) + "\n").repeat(Y)
  • gray wilcox

    October 3, 2022 at 5:22 pm

    Thank you!!!

Viewing 1 - 3 of 3 posts

Log in to reply.

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