Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Layer Control set to “None”

  • Layer Control set to “None”

    Posted by David Heidelberger on April 30, 2014 at 9:33 pm

    Hello, I’ve got a quick question about using Layer Controls. If the control is set to none, is there any way to determine that?

    I’ve tried examining the values of all of the following

    thisComp.layer("Null 1").effect("Layer Control")("Layer")
    thisComp.layer("Null 1").effect("Layer Control")("Layer").index
    thisComp.layer("Null 1").effect("Layer Control")("Layer").value

    and all I get is an error message that says “…effect layer parameter is set to None, can’t use it.” Googling that error led to very spare results and I haven’t yet found good documentation on the properties of a layer control.

    I have a text layer whose source text I’d like to use as a prefix to a different text layer. Ideally, I’d like to use a layer control set to none to disable use of the prefix, or set to the prefix text layer to use the prefix. I could use a checkbox and search for the prefix layer by name if the box is checked, but this method seems more flexible, if it’s possible.

    Thanks for the help.

    David

    Shin Gimel replied 5 years, 1 month ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    April 30, 2014 at 9:43 pm

    What I’d do is wrap the layer control access in try/catch, like this:


    try{
    L = effect("Layer Control")("Layer");
    prefix = L.text.sourceText;
    }catch (err){
    prefix = "";
    }

    prefix + "other stuff"

    Dan

  • David Heidelberger

    April 30, 2014 at 10:20 pm

    Thanks, Dan! I didn’t realize you could trap errors in AE expressions, very cool.

  • Shin Gimel

    March 25, 2021 at 11:19 am

    ?

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