Leo
  • Posts
  • Projects
  • About
  • Posts
  • Projects
  • About
Bilibili抖音小红书

© 2026 XT. All rights reserved.

  1. Home
  2. Posts
  3. AE Null Object and Shape Layer Edge Binding Control

AE Null Object and Shape Layer Edge Binding Control

A summary of the universal approach for linking sliders with expressions in AE to achieve stable binding between null objects and shape layer edges.

Leo WangOctober 22, 2025

In After Effects, if you need a null object to stay glued to a shape layer edge without hand-keyframing every adjustment, sliders paired with expressions are the most reliable approach: the slider reads edge value changes, and the expression converts the delta into a position offset so the relative distance stays fixed. Below is the core idea, a reusable template, and practical notes for getting it right.

Core Idea

After enough trial and error, the whole chain boils down to three steps—slider captures change, expression converts position, relative relationship stays fixed:

  • What the slider does: Binds to the target edge value on the shape layer; when the edge moves, the slider value moves with it.
  • What the expression does: Reads the current slider value and adds the offset to the null’s baseline position, keeping the relative distance to the edge constant.
  • Where it shines: When a null needs to hug one edge (bottom, right, etc.) and follow continuously—especially in multi-layer setups.

Universal Expression Template

Following that logic, you get a reusable pattern. For different edges, only the baseline parameters change:

// Universal expression for null object and shape layer edge binding
s = thisComp.layer('转换值').effect('滑块控制')('滑块')
baseSlider = baseEdgeValue
baseValue = nullObjectInitialPosition

// Adjust null object position synchronously based on edge changes, maintaining relative position
baseValue + (s - baseSlider) / 2

Here, s is the live slider value, baseSlider is the edge’s initial baseline, and baseValue is the null’s starting position. Compute the offset with (s - baseSlider) / 2, add it to baseValue, and the null tracks smoothly.

Two Common Uses

Both scenarios below use the same expression structure—swap in different baseline values.

Example 1: Binding to One Edge

The null sticks to a target edge on the shape layer and moves with it.

s = thisComp.layer('转换值').effect('滑块控制')('滑块')
baseSlider = baseEdgeValue
baseValue = nullObjectInitialPosition

baseValue + (s - baseSlider) / 2

When the slider moves, the null adjusts in step—the relative distance to the target edge never changes.

Example 2: Multiple Edges, Multiple Nulls

Several nulls each bound to a different edge, each keeping its own stable relative position.

s = thisComp.layer('转换值').effect('滑块控制')('滑块')
baseSlider = baseEdgeValue
baseValue = nullObjectInitialPosition

baseValue + (s - baseSlider) / 2

The same logic scales to more nulls and more edges.

Notes When Applying

  • Match layer and effect names: "转换值" and "滑块控制" must exactly match AE (spaces and capitalization count), or the expression will error.
  • Baseline values must be accurate: baseSlider and baseValue must reflect the initial frame, or the binding drifts.
  • Paste in the right place: Hold Alt, click the stopwatch on the null’s Position (or individual X / Y), then paste.
  • Adjust follow strength: Change /2 to another coefficient to tune how strongly the null follows the edge.

Summary

The whole approach rests on two things: a slider that captures edge change, and an expression that converts it to position. Once the template is familiar, multi-null, multi-edge setups come together quickly—with less repetitive tweaking and more stable motion.