Creative Communities of the World Forums

The peer to peer support community for media production professionals.

  • Posted by Alex Harding on February 1, 2007 at 4:51 pm

    hi there
    is it possible to reference the rotation value of a layer without taking into account the ‘multiplier’ value?

    ie

    my rotation (its self governed by an expression) resolves its self to ” -3 x 0.0 ”

    however, another expression which is dependent on this value reaching 0, reads this as -1080
    is there a way to only reference the rotation out of 360, rather than than the accumulating value?

    cheers,

    Alex

    Mike Clasby replied 19 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Mike Clasby

    February 1, 2007 at 7:00 pm

    It would be nice to see the expression you’re working on, but methinks you need to use “%” the modulus operator, it gives the remainder.

    In this expression, a Blue Solid’s rotation is the same as the Medium Red Solid’s rotation (just by pickwhipping the Blue Solid’s rotation to the Medium Red Solid’s rotation.

    thisComp.layer(“Medium Red Solid 1”).rotation

    So “-3 x 0.0” on the Red gives “-3 x 0.0” on the Blue.

    But if you add %360 to the expression you get what you are after:

    thisComp.layer(“Medium Red Solid 1”).rotation%360

    The 360 tells it what to divide by, and then gives the remainder.

    So “-3 x 0.0” on the Red gives “0 x 0.0) on the Blue.

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