Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression Error!!

  • Expression Error!!

    Posted by Naveen Prasanth on November 15, 2009 at 2:00 pm

    I was working with AE last night with an expression,the purpose of this expression,was simply for the background layer to have the opposite color of a shape layer.First, I hooked up three slider control effects to a null and renamed them each as red,green,blue.Then i made the expression in the shape layer’s fill property as,
    red = thisComp.layer(“Null 1”).effect(“red”)(“Slider”);
    green = thisComp.layer(“Null 1”).effect(“green”)(“Slider”);
    blue = thisComp.layer(“Null 1”).effect(“blue”)(“Slider”);
    alpha = 1;
    [red,green,blue,alpha]
    This worked out fine, i also added the wiggle expression to the sliders and everything went well until when i wanted the background layer to have the opposite color the shape layer and so here is the expression
    red = thisComp.layer(“Null 1”).effect(“red”)(“Slider”);
    green = thisComp.layer(“Null 1”).effect(“green”)(“Slider”);
    blue = thisComp.layer(“Null 1”).effect(“blue”)(“Slider”);
    alpha = 1;
    hsl = rgbToHsl([red,green,blue,alpha)];
    hsl[0] += .5;
    if (hsl[0]>1) (hsl[0] -= 1);
    rgb = hslToRgb(hsl);
    rgb

    Naveen Prasanth replied 16 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Xinlai Ni

    November 15, 2009 at 4:22 pm

    Is this because you have a ([… )] mismatch in the rgtToHsl line?

    Xinlai Ni
    Software Engineer, Google Inc.

  • Naveen Prasanth

    November 16, 2009 at 2:54 am

    Thank u Xilnai didn’t notice that bugger! I will try rectifying it!!

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