Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Clamp Expression – Only xClamp works when applying xClamp and yClamp

  • Clamp Expression – Only xClamp works when applying xClamp and yClamp

    Posted by Sebastian Paetz on January 27, 2020 at 12:23 pm

    Hey guys,

    here the problem:

    I want to limit the scale of my text from min. 45% to max. 85%.

    So i tried this expression on the scale:

    yClamp=clamp(transform.scale[1],45,85);
    [transform.scale[0], yClamp];

    xClamp=clamp(transform.scale[0],45,85);
    [xClamp, transform.scale[1]];

    Now the xClamp works fine for the x value, but the y value is not affected.

    Anyone knows what to do to get the y value affected, too?

    Thanks in advcance,

    Basti

    yClamp=clamp(transform.scale[1],45,85);
    [transform.scale[0], yClamp];

    xClamp=clamp(transform.scale[0],45,85);
    [xClamp, transform.scale[1]];

    Sebastian Paetz replied 6 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 27, 2020 at 5:00 pm

    Try it this way:

    clamp(transform.scale,[45,45],[85,85])

    Dan

  • Sebastian Paetz

    January 27, 2020 at 5:09 pm

    works perfectly. thank u so much!

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