Skip to content

Instantly share code, notes, and snippets.

@Sphiment
Last active January 12, 2025 20:51
Show Gist options
  • Save Sphiment/1b907c01f9bbe3f7c569cbdcf6ae9105 to your computer and use it in GitHub Desktop.
Save Sphiment/1b907c01f9bbe3f7c569cbdcf6ae9105 to your computer and use it in GitHub Desktop.
Bend anchor point to the top of the layer - after effects expression
const rect = thisLayer.sourceRectAtTime();
if (thisLayer.text || thisLayer.content) {
[toComp([rect.left + rect.width / 2, rect.top])[0], toComp([rect.left + rect.width / 2, rect.top])[1]];
} else {
[anchorPoint[0],anchorPoint[1] - rect.height/2 ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment