ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Use expression to control "Set Channels" Source layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Daniel Hashimoto
Use expression to control "Set Channels" Source layer
on Apr 12, 2017 at 7:01:24 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


Return to posts index

Dan Ebberts
Re: Use expression to control "Set Channels" Source layer
on Apr 12, 2017 at 7:36:59 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



Return to posts index

Daniel Hashimoto
Re: Use expression to control "Set Channels" Source layer
on Apr 12, 2017 at 7:38:55 pm

Appreciate that, Dan!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]