ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

What's wrong with my script to enable layer styles?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Xinlai NiWhat's wrong with my script to enable layer styles?
by on Sep 17, 2009 at 10:14:04 pm

Hi cows:
I have a simple script to add a comp to a project, add a layer to the comp, then
I attempted to add the "Inner Glow" layer style to the layer. But it doesn't work -
by doesn't work I mean when you twirl down the layer properties, no layer styles
were ever created.
Basically what I wanted to do is to automate the menu action
Layers > Layer Styles > Inner Glow.

I opened the extended toolkit and watched the var values, the layerStyles variable
has 'enabled' set to true, but its 'selected' is set to false, however I can't
do layerStyles.selected = true because
"Cannot set selecred with this property because the property or a parent property
is hidden".

Any help will be appreciated.
Thanks
{
app.beginUndoGroup("Test");
var proj = app.project;
var projItems = proj.items;
var comp = projItems.addComp("foo", 200, 200, 1, 5, 30);
var layer1 = comp.layers.addSolid([0.5, 0, 0], "solid", 200, 200, 1);
var layerStyles = layer1.property("Layer Styles");
var innerGlow = layerStyles.property("Inner Glow");
alert(innerGlow.enabled);
app.endUndoGroup();
}


Return to posts index

Dave LaRondeRe: What's wrong with my script to enable layer styles?
by on Sep 18, 2009 at 2:50:36 pm

Have you asked this question on the COW's After Effects Expressions forum?

Dave LaRonde
Sr. Promotion Producer
KCRG-TV (ABC) Cedar Rapids, IA


Return to posts index

Xinlai NiRe: What's wrong with my script to enable layer styles?
by on Sep 18, 2009 at 4:26:22 pm

yes, nobody answered yet, that's why I'm broadcasting to some other audiences as well.

Xinlai Ni


Return to posts index

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