Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Control AV layer Blend Modes from scriptUI

  • Control AV layer Blend Modes from scriptUI

    Posted by Scott Reed on September 17, 2020 at 5:06 am

    I’ve been searching all day for an answer to this but I can’t seem to find one, which leads me to believe my situation is really unique or there just isn’t a way to do this.

    I frequently am rendering out anatomical still shots from Maya, and compositing the .EXR files in AE. The (relatively) new .EXR importer automation is great, gets me all the layers separated easy peasy. The problem is after that. I’m often working with at least 20 separate, non-sequential still shots at once, and going through and setting each render layer blending mode for each .exr is effing tedious. For organizational purposes, putting all the layers in the top comp and selecting all of them there is a no go, as I would end up going through about 120 layers on average, setting them, and then having to figure out which ones go where after that.

     

    I can automate setting the opacity, layer styles, effects, etc based on search terms and layer names (ie: all “diffuse_direct” layers get 70% opacity), but I can’t say, set all those to “screen” or “soft light” etc without doing it manually.

    Best solution I have is to search and select certain layers with a button press in a panel, then manually change all the selected to the desired blending mode, but I would like to just have it do all that for me with a single button press.

    Is that even possible? Is there a setValue type function that can access that?

     

    Thanks.

     

     

    Scott Reed replied 5 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    September 17, 2020 at 6:12 am

    app.project.activeItem.selectedLayers[0].blendingMode = BlendingMode.ADD;

    List of available values. You can use either the text OR the number.

    BlendingMode.ADD – 5220

    BlendingMode.ALPHA_ADD – 5244

    BlendingMode.CLASSIC_COLOR_BURN – 5219

    BlendingMode.CLASSIC_COLOR_DODGE – 5225

    BlendingMode.CLASSIC_DIFFERENCE – 5234

    BlendingMode.COLOR – 5238

    BlendingMode.COLOR_BURN – 5218

    BlendingMode.COLOR_DODGE – 5224

    BlendingMode.DANCING_DISSOLVE – 5214

    BlendingMode.DARKEN – 5215

    BlendingMode.DARKER_COLOR – 5247

    BlendingMode.DIFFERENCE – 5233

    BlendingMode.DISSOLVE – 5213

    BlendingMode.DIVIDE – 5249

    BlendingMode.EXCLUSION – 5235

    BlendingMode.HARD_LIGHT – 5228

    BlendingMode.HARD_MIX – 5232

    BlendingMode.HUE – 5236

    BlendingMode.LIGHTEN – 5221

    BlendingMode.LIGHTER_COLOR – 5246

    BlendingMode.LINEAR_BURN – 5217

    BlendingMode.LINEAR_DODGE – 5223

    BlendingMode.LINEAR_LIGHT – 5229

    BlendingMode.LUMINESCENT_PREMUL – 5245

    BlendingMode.LUMINOSITY – 5239

    BlendingMode.MULTIPLY – 5216

    BlendingMode.NORMAL – 5212

    BlendingMode.OVERLAY – 5226

    BlendingMode.PIN_LIGHT – 5231

    BlendingMode.SATURATION – 5237

    BlendingMode.SCREEN – 5222

    BlendingMode.SUBTRACT – 5248

    BlendingMode.SILHOUETE_ALPHA – 5242

    BlendingMode.SILHOUETTE_LUMA – 5243

    BlendingMode.STENCIL_ALPHA – 5240

    BlendingMode.SOFT_LIGHT – 5227

    BlendingMode.STENCIL_LUMA – 5241

    BlendingMode.SUBTRACT – 5248

    BlendingMode.VIVID_LIGHT – 5230

    By now you may think I am a wizard :D. Actually, I use this document a lot. Just go in, search blending mode. I, however, came up with the number values with my own method. So I am half a wizard.

    Take care!

  • Scott Reed

    September 17, 2020 at 5:15 pm

    Ah thank you! I’ll give it a try. I just couldn’t find the right syntax or method to set the blending modes. I’ve got access to a bunch of the scripting documents (including the one you shared), I must have been searching the wrong terms haha.

    Thanks again! I’ll let you know if this does what I need!

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