FORUMS: list search recent posts

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
riccardo sinti
Rotation to Opacity but ignoring the minus sign in the negative values
on Aug 19, 2011 at 8:14:52 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


Return to posts index

Dan Ebberts
Re: Rotation to Opacity but ignoring the minus sign in the negative values
on Aug 19, 2011 at 8:34:47 pm

This should work:

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


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]