Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Expression to drive Anchor Point

  • Expression to drive Anchor Point

  • Chris Voelz

    September 18, 2018 at 8:17 pm

    I am building a template project that can be easily imported and changed for each video we produce. I can’t quite wrap my brain around how to achieve this super specific expression. I want the size of a shape layer box to control the anchor point of a Null object. For every 1 pixel added, or subtracted, to the width of the shape layer I want the Null object’s Anchor Point to shift by 0.5 pixels. So increasing the width would shift the Anchor Point to the right and decreasing the width would shift it to the left. The point of this is to keep the middle of the shape layer center to the comp so when it animates in it is from the center. Normally it wouldn’t be an issue but I have some graphics on the left side of the shape layer and want to maintain their positional relationship, so the shape layer is anchored to the left. The starting width for the shape layer is 1322. I also have rounded corners and have the other expressions set up to help maintain their ratio.

    The arrow in the image is pointing out what will drive the anchor point. “Text Box” is the shape layer that the slider is controlling and showing current expressions being used.

    Thanks for any help or insight you can provide!

  • Chris Voelz

    September 18, 2018 at 10:15 pm

    After walking away for a couple hours I figured it out. I just needed to think of it from a different perspective. Established that the starting value as 1322 and everything fell into place. Pretty simple actually.

    temp = thisComp.layer("Layer Name").effect("Slider Name")("Slider");
    [((temp-1322)/2), 0]

Viewing 1 - 2 of 2 posts

Log in to reply.

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