Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expressions and contents problem

  • Expressions and contents problem

    Posted by Diego Mellado on June 4, 2014 at 3:32 pm

    Hello!
    First of all, thanks for your attention. I am having trouble with the following expressions.
    Whilie this works OK:


    comp("Mask").layer(thisLayer.name).content(5).content("Shape 1").content("Path 1").path

    This one doesn’t:


    index = 5;
    comp("Mask").layer(thisLayer.name).content(index).content("Shape 1").content("Path 1").path

    Does anyone have an idea on why?
    I am using CS6 on Mavericks.

    Thanks a lot!
    Diego

    Diego Mellado replied 11 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 4, 2014 at 3:53 pm

    One thing I see is that “index” is a reserved word representing the layer’s order in the layer stack. So setting index = 5 won’t do anything and when you refer to index in the next line, what you’ll get is the index of the layer hosting the expression. Try something like idx instead.

    Dan

  • Diego Mellado

    June 4, 2014 at 5:27 pm

    So obvious I feel stupid…
    Thanks a lot!
    D!

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