Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Linking effect’s layer select to another layer control?

  • Linking effect’s layer select to another layer control?

    Posted by Eli Coogan on June 5, 2014 at 2:41 pm

    Hi,

    In a comp, I have:

    Image1
    Adjustment Layer
    Solid1

    On the Adjustment Layer, I’d like to apply an Expression Controls > Layer Control
    On Solid1 I’d like to apply Compound Arithmetic. In Compound Arithmetic’s “Second Source Layer” option, I’d ideally like to link that to the Adjustment Layer’s Layer Control and select Image1 from inside it.

    The reason I ask, is that I plan on copying the solid several times and would prefer to control the image from just one layer.

    Thanks in advance!

    Eli Coogan replied 11 years, 11 months ago 2 Members · 4 Replies
  • 4 Replies
  • George Goodman

    June 5, 2014 at 3:00 pm

    Hmm…not gunna be that easy since you cant apply an expression directly to the second source layer. Maybe you could apply multiple instances of compound arithmetic to the adjustment layer as well as a slider control and reference the various versions of effects by their index with an if else statement depending on the number of that slider control – ie when slider control is at 1 the effect with index 1 is active and all else are off.

    Not sure if there is a better way, but that miiiiight do the trick.

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • Eli Coogan

    June 5, 2014 at 3:19 pm

    Thanks for the response! It’s really too bad that you can’t layer controls, it’d be so much easier. That sounds like a solid idea, but I’m not skilled enough to pull that off–otherwise, I’m sure I would give it a go, ha.

    I think I’ll instead precompose the Image1 layer and then just switch it out from inside it’s new comp, since I’m not smart enough to learn script writing.

  • George Goodman

    June 5, 2014 at 3:39 pm

    Thought of an easier way, but not sure if it will do what you want.

    You can effect the opacity of the solid layer itself. So put the effect on the solid and add a slider control on an adjustment layer and add this expression to the opacity of the solid. You’ll need to manually change the compound arithmetic on each solid though.

    Now just set your slider to the layer number you want to be visible.

    on=100;
    off=0;
    slider=thisComp.layer("Adjustment Layer 1").effect("Slider Control")("Slider");
    if (slider==index) on else off

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • Eli Coogan

    June 5, 2014 at 4:01 pm

    That will really come in handy for other things, I’m sure, but I feel bad as I’ve done a bad job explaining in full… so sorry to waste your time…

    I’ve simplified the situation. I’m actually trying to project an image onto a set of puzzle pieces. So, I’ve got about 20 Solids, with their Compound Arithmetics layer set to the Image1 (which has its visibility shut off). The solids are also set as an AlphaMatte to cut out the 20 puzzle pieces.

    I wanted to be able to use a control layer so that I could add more Images to the comp and easily change out what appeared on the puzzle.

    Once again, thanks for all your help–sorry that I didn’t elaborate!

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