Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Use expression to control “Set Channels” Source layer

  • Use expression to control “Set Channels” Source layer

    Posted by Daniel Hashimoto on April 12, 2017 at 7:01 pm

    Is there a way to use an expression (script/hack/other effect) to control/set the “Source Layer” dropdown in the Set Channels effect?

    For example, I have a source piece of footage in the comp (Layer 1).
    Below that I have several solids using the Set Channels effect, sourcing Layer 1.
    I’d love to have one Null or something with a Layer Control dropdown that then propogates that selection to the Set Channels effects in all my solids – but the problem is “Source Layer” is not key-frame-able to be linked via expression.

    It’s a bizzare setup, I know – but I’m working in a project where I want to avoid pre-comps, and need the project to be simple enough to use before I hand it off to a team who will need a simple workflow.

    There may even be an effect I don’t know about that allows you to copy a layer’s RGBA and you can control the source layer selection with an expression. Any help much appreciated.

    – Hashi

    Daniel Hashimoto replied 9 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 12, 2017 at 7:36 pm

    You couldn’t do it with an expression, but you could do it with a script, like this simplified example:

    var myLayer = app.project.activeItem.layer(“Layer 1”);
    var myEffect = myLayer.property(“Effects”).property(“Set Channels”);
    var myNewSourceLayer = app.project.activeItem.layer(“replacement.mov”);
    myEffect.property(“Source Layer 1”).setValue(myNewSourceLayer.index);
    myEffect.property(“Source Layer 2”).setValue(myNewSourceLayer.index);
    myEffect.property(“Source Layer 3”).setValue(myNewSourceLayer.index);
    myEffect.property(“Source Layer 4”).setValue(myNewSourceLayer.index);

    Dan

  • Daniel Hashimoto

    April 12, 2017 at 7:38 pm

    Appreciate that, Dan!

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