Autocenter Anchor Point
Snap the Anchor Point to the center of any layer.
Code
const {left, top, width, height} = sourceRectAtTime();
[left + width/2, top + height/2]
//Variants ⤵️
//Left-center: [left, top + height/2]
//Right-center: [left + width, top + height/2]
//Top-center: [left + width/2, top]
//Bottom-center: [left + width/2, top + height]
anchor pointautocenterafter effects
How to Use
Apply this expression to the Anchor Point property of any layer to autocenter it based on the layer bounds.