Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Couldn’t find layer…that is there

  • Couldn’t find layer…that is there

    Posted by Matthew Tully on June 12, 2008 at 3:54 pm

    Hey friends,

    I’m working on a project that keeps giving me an error I don’t understand. I understand how to read the error I just don’t get why it’s happening.

    Here is the expression used on a layers scale property:

    temp = comp(“montage”).layer(“Controller”).effect(“Scale FG”)(“Slider”);
    [temp,temp]

    Here is the error:

    After Effects warning: Bad argument: couldn’t find layer named “Controller”
    Expression Disabled.

    Error occurred at line 1.
    Comp: ‘photo mix”
    Layer: 2 (‘people’)
    Property: ‘Scale’

    Simple enough right? No. The issue I’m having is the layer “Controller” does exist. It’s one step up from the nested comp. I have even pick-whipped to it to make sure syntax is ok, and it is still telling me it’s missing.

    The top layer of the project has a bunch pre-comps all called “montage.” Every pre-comp has the exact same syntax, could this be throwing things off? Having the same name?

    Please help.

    Rolf Fuehringer replied 17 years, 10 months ago 3 Members · 6 Replies
  • 6 Replies
  • Matthew Tully

    June 12, 2008 at 5:37 pm

    Along the same lines can I turn something like

    comp(“montage”).layer(“pic control”)

    into something like

    thisComp.parentComp.layer(“pic control”)

  • Dan Ebberts

    June 12, 2008 at 5:59 pm

    Yup. It will check the first “montage” comp it encounters in the project bin for a layer named “Controller”. If it doesn’t find the layer in that comp, you’ll get the error.

    edit: Actually, it might be the last one it encounters. Same issue though.

    Dan

  • Dan Ebberts

    June 12, 2008 at 6:01 pm

    Nope. No way to get to a comp’s parent comp except by name.

    Dan

  • Matthew Tully

    June 12, 2008 at 6:23 pm

    Thanks Dan.

    Is there any way to look into folders in the bin from the same expression?

    As usual, you are a rockstar!

    – Matt

  • Dan Ebberts

    June 12, 2008 at 7:44 pm

    No. You can do it with a script (in a round-about way), but not an expression.

    Dan

  • Rolf Fuehringer

    July 14, 2008 at 10:30 am

    Hi Dan,

    You really saved my day!!! That was exactly the right solution for my problem here!
    Just wanted to say thanks!
    So – Thanks 😉
    regs Rolf

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