Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Layer Control to drive opacity of a single layer

  • Layer Control to drive opacity of a single layer

    Posted by Craig Kristensen on April 28, 2016 at 8:38 am

    I have a comp with hundreds of layers (all with an opacity of 0), and I need an easy way to select just one layer and make it visible.

    Is this possible with “Layer Control”? Possibly in combination with a Check box that sets the opacity value to 100 when checked?

    Craig

    Wallace Adrian d’alessio replied 10 years, 4 months ago 3 Members · 5 Replies
  • 5 Replies
  • Craig Kristensen

    April 28, 2016 at 9:11 am

    I have been trying to get something like this to work.
    I have a text layer that reads the value of the Layer Control using:
    thisComp.layer(“— SELECT”).effect(“Selector”)(“Layer”).name

    And then using this on the opacity for each layer to check if the “FRANCHISE NAME” equals the name of the layer. If so, “then opacity = 100”
    ifi(thisComp.layer(“FRANCHISE NAME”).text.sourceText = (“thisLayer.name”)) 100 else 0;

    But I’m having some syntax troubles.

  • Walter Soyka

    April 28, 2016 at 9:53 am

    [Craig Kristensen] “I have a text layer that reads the value of the Layer Control using:”

    Layer Controls cannot be keyframed, so this value will be constant throughout the comp. It doesn’t sound like that’s what you want.

    [Craig Kristensen] “ifi(thisComp.layer(“FRANCHISE NAME”).text.sourceText = (“thisLayer.name”)) 100 else 0;

    Here’s the correct syntax:
    if (thisComp.layer("FRANCHISE NAME").text.sourceText == thisLayer.name) 100 else 0;

    1) It’s “if” not “ifi”.

    2) Equality comparison uses “==” not “=”.

    3) There is no reason to enclose thisLayer.name in quotes and parentheses. “name” is an attribute of the object called “thisLayer”.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Craig Kristensen

    April 28, 2016 at 10:02 am

    Works perfectly!

    Is it possible to use a Layer Control to select layers in a different comp?

  • Walter Soyka

    April 28, 2016 at 10:19 am

    [Craig Kristensen] “Is it possible to use a Layer Control to select layers in a different comp?”

    No, but you could refer from your main comp to a layer control effect on a layer in a different composition:

    comp("OTHER COMP").layer("— SELECT").effect("Selector")("Layer").name

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Wallace Adrian d’alessio

    April 29, 2016 at 3:21 pm

    You can precomp . Then drag out timelines for the precomp and the comp and then pick whip across.

    I have done it.

    .

    Adrian D\’Alessio aka; Fluxstringer

    fluxstringer@gmail.com
    https://www.facebook.com/FluxStringer
    https://www.linkedin.com/in/fluxstreamcommunications

    https://twitter.com/FluxStringer
    https://mog.com/FluxMuse

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