Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions effect()index out of range, expression disabled!!!!!!!!!

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

    Posted by Stefan Sorin on February 9, 2012 at 8:15 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);

    Ben G unguren replied 14 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Ben G unguren

    February 10, 2012 at 11:22 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

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Vimeo framework” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

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