Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale expression

  • Posted by Andrea Baino on August 14, 2015 at 12:49 pm

    Hi all, this is my first post so i’d like to thank you all for all the useful things read here!
    I’ve a problem with a simple expression but i can’t find out how to solve.

    I need a an element to scale inversely proportional than another element.

    The expression works but only for the ‘X’, while for the ‘Y’ it gave me a different result. (the X value minus 100).

    Thanks
    Andrea

    r = thisComp.layer('R')
    sr = r.scale

    S = sr + ((200 - sr)/2);

    S

    Xavier Gomez replied 11 years ago 2 Members · 1 Reply
  • 1 Reply
  • Xavier Gomez

    August 14, 2015 at 3:30 pm

    Hi,

    sr is an array (eg [100,100]) and 200 a number.
    After Effects allows adding arrays and numbers, it gives a meaning to it, but maybe not the one you expect.
    For instance [0,0] + 1 = [1, 0].
    That is, AE converts 1 to [1,0] then adds the 2 vectors.

    I dont know what exactly you want to achieve but you might take this into account. Replacing 200 by [200,200] might be enough.

    Xavier.

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