Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Reference this comp name in expression

  • Reference this comp name in expression

    Posted by Peter Stone on July 30, 2014 at 4:49 pm

    I am trying to migrate a few key frame attributes to show up in a comp higher in my hierarchy, so I have been using expressions that link to sliders in higher comps.

    comp(“Keyframed Comp”).layer(“This Comp”).effect(“Property”)(“Slider”)

    It works fine, but I was just hoping to speed up my process a bit, is there a way to retrieve the name of the current comp as text? Right now, I have to change layer(“this comp”) every time I copy the expression in a new comp, but the layer I am referencing is always just the name of the current comp I am applying the expression to.

    Eric Chard replied 5 years, 3 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 30, 2014 at 5:01 pm

    Like this:

    comp(“Keyframed Comp”).layer(thisComp.name).effect(“Property”)(“Slider”)

    Dan

  • Peter Stone

    July 30, 2014 at 5:27 pm

    Perfect, Thanks

  • Eric Chard

    February 5, 2021 at 7:45 pm

    Seven years later, just what I needed. THANKS. ?

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