FORUMS: list search recent posts

effect()index out of range, expression disabled!!!!!!!!!

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stefan Sorin
effect()index out of range, expression disabled!!!!!!!!!
on Feb 9, 2012 at 8:15:25 pm

Hello, I'm trying to use an expression to copy the color from a layer and represent it to another. I've tried replacing "index-1" with "1" and it works, but I'm using a gradient as the parent layer, and the colors won't switch, it remains the same color. What should I do?


samplePoint = thisComp.layer("Gradient").effect(index-1)("Point");
sampleRadius = [10,10];

Return to posts index

ben g unguren
Re: effect()index out of range, expression disabled!!!!!!!!!
on Feb 10, 2012 at 11:22:58 pm

I don't understand why you're using "index-1" in the first place. "Index" will return your layer number, but you have it referencing your effect. so if the expression-ed layer is, say, layer 50, then "index-1" will return 49, which (as I understand things) will look for the 49th effect in the layer called "Gradient." This only makes sense if you have lots of effects applied to the Gradient layer. Is that what you had in mind?

I guess I don't completely understand how your layers/effects are organized right now....

Ben Unguren
Motion Graphics & Editing

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved