Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Link rotation to two different slider controls

  • Link rotation to two different slider controls

    Posted by Lasse Gjertsen on March 12, 2012 at 4:57 pm

    I’m pretty new to expressions, but it has surely opened a bunch of doors!

    I’m rigging a face for animation. I’ve got two groups under one shape layer named “Eyebrows”: “Eyebrow L” and “Eyebrow R”.

    I’ve linked each eyebrow’s position and rotation to two different slider controls so that the eyebrows will move symmetrically when I use the sliders.

    Now, I want to be able to make a slider that controls a contra-rotation as well, where “Eyebrow L” goes from -25° to 45° and “Eyebrow R” goes from -30° to 40°, but at the same time be able to use the rotation-slider.

    In other words; the conta-rotation will have to be relative to the symmetrical rotaton of the two shape layer groups.

    Is it possible to make an expression on that, or do I need to put each eyebrow in seperate layers?

    Thanks 🙂

    Adira Kessler replied 5 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Adira Kessler

    September 1, 2020 at 8:11 pm

    I know you posted this like 8 years ago, I hope that by now you have found the solution but in case not, I figured it out. The secret to combining two sliders [or other expression controls] to one property is: Conditional Statement

    The secret formula is the if/else statement and a checkbox control with two keyframes (on then off).
    So, you need to have your sliders equal to a value. the value can be written as anything, a letter a word, a number. I wouldn’t use numbers because it might look confusing.

    v = (pick whip to the first slider);
    z = (pick whip to the second slider);

    if (thisComp.layer(“LayerName”).effect(“CheckBoxName”)(“Checkbox”).value>0) {v}
    else {z}

    v = thisComp.layer("LayerName").effect("1stExpressionControlName")("Point");
    z = thisComp.layer("LayerName").effect("2ndExpressionControlName")("Point");

    if (thisComp.layer("LayerName").effect("CheckBoxName")("Checkbox").value>0) {v}
    else {z}

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