Skip to content

Instantly share code, notes, and snippets.

@animoplex
Last active January 14, 2023 00:33
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save animoplex/c2851ff2ecd424704bae9c754644f1ef to your computer and use it in GitHub Desktop.
Save animoplex/c2851ff2ecd424704bae9c754644f1ef to your computer and use it in GitHub Desktop.
Clamp Values - After Effects Expression by Animoplex
// Clamp Values - Created by Animoplex: www.animoplex.com
// Limits a slider or keyframable value with a minimum and maximum value clamp.
// Full Tutorial: https://www.youtube.com/watch?v=MITA3ygqvQY&t=313s
// Variation A: Slider (1 Value)
minVal = 0;
maxVal = 100;
clamp(effect("Size")("Slider"), minVal, maxVal)
// Variation B: Position (2 Values)
minVal = [0, 0];
maxVal = [200, 200];
clamp(thisComp.layer("Layer 1").position, minVal, maxVal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment