Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Rotation to Opacity but ignoring the minus sign in the negative values

  • Rotation to Opacity but ignoring the minus sign in the negative values

    Posted by Riccardo Sinti on August 19, 2011 at 8:14 pm

    I am using this expression to link the opacity of a text layer to the y rotation or another layer

    T = comp(“COMP_1”).layer(“Picture”).transform.yRotation;

    [linear(T, 0, 70, 100, 0)]

    The picture layer goes from 70 deg to 0 deg then from 0 deg to -70 deg and I want the opacity of my text layer to go from 0 to 100 and then from 100 to 0 as the picture layer rotates.

    So basically what I’m asking is how do I get the expression to ignore the minus sign in the rotation values?

    Thanks

    Dan Ebberts replied 15 years ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    August 19, 2011 at 8:34 pm

    This should work:

    T = Math.abs(comp(“COMP_1”).layer(“Picture”).transform.yRotation);
    [linear(T, 0, 70, 100, 0)]

    Dan

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