Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions using layer control to select color or the ramp effect for layers

  • using layer control to select color or the ramp effect for layers

    Posted by Adam Tanner on February 26, 2014 at 3:13 pm

    Hi,

    I’m trying to create a system in which a user can use a layer control drop down menu to choose the color of specific layers. The catch is one of the color options is also the ramp effect.

    Right now I have a series of nulls. The null “Control” contains the layer control effect. The layer control references other nulls named “black”, “red”, “ramp”, etc.. I also have a null called “colors” which contains all the effects (color control and ramp). These effects are named “black”, “red, “ramp”, etc…

    The expression I use works great for changing the color of a fill on a solid, but I’m not sure how to make it deactivate the fill and add a ramp. Any ideas?

    Let me know if that doesn’t make sense.

    a = thisComp.layer("Control").effect("Color1")("Layer").name;

    thisComp.layer("colors").effect(a)("Color")

    Darby Edelen replied 12 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Darby Edelen

    February 27, 2014 at 12:40 am

    [Adam Tanner] “The expression I use works great for changing the color of a fill on a solid, but I’m not sure how to make it deactivate the fill and add a ramp. Any ideas?”

    My suggestion would be to only use the Ramp. Use a Tint effect after the ramp to re-color the ramp as necessary. If you set the “Map Black To” and “Map White To” outputs of the Tint effect to the same color you’ll get a solid color fill.

    Darby Edelen

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