Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects After Effects warning: Bad argument: effect() index out of range, expression disabled.

  • After Effects warning: Bad argument: effect() index out of range, expression disabled.

    Posted by Fernando Ania on October 20, 2013 at 8:08 pm

    Hello, I am trying to follow a tutorial in which I am applying the Echospace effect. The problem lies when I try to copy the color from a layer and paste it on the repeated layers. I am not completely sure what the “index-1” does, but I have tried replacing it with “1” which only copies the color from the first point I made on the other layer. I have also tried index+1, which somewhat works. I mean I get the same error, but not on all of the repeated layers. I would be fine with this if they wouldn’t change color to white when I tried to change their mode (from “Normal” to “Add”). Am I missing something out?

    Thank You.

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

    Erik Waluska replied 12 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Erik Waluska

    October 20, 2013 at 11:09 pm

    I don’t quite understand what you are doing but “index” is the layer number, “index-1” means the number of the layer above and “index+1” is the number of the layer below if that helps at all.

    The Add blending mode does what it says, it adds the RGB color values of the layers together. If that sum is 255 or more you get pure white.

    Erik Waluska
    EAWmedia

  • Fernando Ania

    October 20, 2013 at 11:22 pm

    Thank you, I have just realised that my problem was that the number of instances created by the Echospace effect did not match the number of sample points I created on a layer with a gradient, hence the error “out of range”. 8D

  • Erik Waluska

    October 20, 2013 at 11:36 pm

    Glad you got it figured out.

    Erik Waluska
    EAWmedia

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