ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stefan Sorineffect()index out of range, expression disabled!!!!!!!!!
by 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?

Thanks!

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


Return to posts index

ben g ungurenRe: effect()index out of range, expression disabled!!!!!!!!!
by 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
http://www.mostlydocumentary.com


Return to posts index

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