• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is it possible to change "Layer Styles" properties such as "Color Overlay" in script ?

New Here ,
Dec 27, 2011 Dec 27, 2011

Copy link to clipboard

Copied

Hi Everyone!

Is it possible to change "Layer Styles" properties such as "Color Overlay" and "Gradient Overlay" in script ?

Thanks,

visuall

TOPICS
Scripting

Views

3.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 27, 2011 Dec 27, 2011

Copy link to clipboard

Copied

"Layer Styles" blend modes are read only. This was using the Stroke Layer Style.

app.project.item(1).layer("Layer Name").property("ADBE Layer Styles").property("frameFX/enabled").property("frameFX/mode2").value

You can read or write a comp layer blend mode though via:

Pg. 42 of Adobe CS3 After Effects Scripting Guide

AVLayer blendingMode attribute

app.project.item(index).layer(index).blendingMode

Description:

The blending mode of the layer.

Type:

A BlendingMode enumerated value; read/write. One of:

BlendingMode.ADD

BlendingMode.ALPHA_ADD

BlendingMode.CLASSIC_COLOR_BURN

BlendingMode.CLASSIC_COLOR_DODGE

BlendingMode.CLASSIC_DIFFERENCE

BlendingMode.COLOR

BlendingMode.COLOR_BURN

BlendingMode.COLOR_DODGE

BlendingMode.DANCING_DISSOLVE

BlendingMode.DARKEN

BlendingMode.DARKER_COLOR

BlendingMode.DIFFERENCE

BlendingMode.DISSOLVE

BlendingMode.EXCLUSION

BlendingMode.HARD_LIGHT

BlendingMode.HARD_MIX

BlendingMode.HUE

BlendingMode.LIGHTEN

BlendingMode.LIGHTER_COLOR

BlendingMode.LINEAR_BURN

BlendingMode.LINEAR_DODGE

BlendingMode.LINEAR_LIGHT

BlendingMode.LUMINESCENT_PREMUL

BlendingMode.LUMINOSITY

BlendingMode.MULTIPLY

BlendingMode.NORMAL

BlendingMode.OVERLAY

BlendingMode.PIN_LIGHT

BlendingMode.SATURATION

BlendingMode.SCREEN

BlendingMode.SILHOUETE_ALPHA

BlendingMode.SILHOUETTE_LUMA

BlendingMode.SOFT_LIGHT

BlendingMode.STENCIL_ALPHA

BlendingMode.STENCIL_LUMA

BlendingMode.VIVID_LIGHT

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 23, 2018 Mar 23, 2018

Copy link to clipboard

Copied

Yes it is possible

shapeLayer = pipComp.layers.addShape(); // adding a shape layer to the pipComp

shapeLayer.selected= true;

        app.executeCommand(9006); // add Fill Color

        var shapeColor = shapeLayer.property("ADBE Layer Styles").property("solidFill/enabled");

        shapeColor.canSetEnabled;

        shapeColor.property("solidFill/color").setValue([1,1,1,1]);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 18, 2018 Dec 18, 2018

Copy link to clipboard

Copied

I have almost the same problem, but the answer has not been given here. I'd like to be able to read the gradient overlay values, I mean this (see picture below)

I need to gather those 4 gradient points values. Is that possible?

#target aftereffects

{

     var theComp = app.project.activeItem;

     var theLayer = theComp.selectedLayers[0];

     alert(theLayer.layerStyle.gradientOverlay.colors);
}

This exists, but I don't know which one the next step would be. I need to get inside colors, but "value" gives me an error.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Dec 20, 2018 Dec 20, 2018

Copy link to clipboard

Copied

LATEST

Gradient data is not exposed to the scripting engine. The way things like Bodymovin access gradient data is by parsing your .aep file as text, searching for specific bits of the file, then scraping that data and turning it into knot/colour info.

A lot of work to get data out, but it's the only known way so far!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines