Change Feature/Search Size and Feature Center of Track Points

What type of scripts do you need?

Moderator: byronnash

Post Reply
Posts: 2
Joined: March 31st, 2021, 12:46 pm

Since working primarily in 4K, using the built-in AE tracker has become a bit of a chore, since the track points are so small by default. I have to first increase the search size and feature size just to be able to grab the point and move it around in the frame, and then I have to zoom into the layer to even separate one point from another. When tracking a lot of shots, this minor slowdown really starts to add up and eat up a lot of time for me.

I'm wondering if there's a script that could take the Current Track and:
1. Separate the Feature Centers of all Track Points apart by a default user-settable (x,y) amount if there are more than 1 Track Points,
2. increase the Feature Size of all Track Points by a default user-settable factor, and
3. increase the Search Size of all Track Points by a default user-settable factor.

Ideally, my tracking workflow would be:
1. Click the Track Motion Button in the Tracker Panel
2. Click the checkboxes for tracking Rotation and Scale if desired
3. Click a KBar button that runs this script, which moves the track points apart and increases their sizes.

Then I'd be able to quickly move the points around and get tracking quickly.

Anyone else interested in something like this? It would be a godsend for me, but unfortunately my scripting knowledge ends with Expressions.

Posts: 2
Joined: March 31st, 2021, 12:46 pm

I managed to write a script that does most of what I need, based on a forum post by Paul Tuersley some 16 years ago!

It only doubles the feature size and search size of track points on the selected layer that don't have any keyframes (It's meant to be used before starting a track).

When I scripted a change to the Feature Center and Attach Point, After Effects subsequently wouldn't let me move the track point without resetting its Feature Center, Feature Size, and Search Size back to defaults. That unwanted resetting behavior seems to be caused by moving the Feature Center and the Attach Point independently of each other, parametrically, without affecting the attach point offset. Therefore, I removed that part of the script and it now only doubles the feature and search size, making the points easier to grab.

Here's what it looks like:

Code: Select all

 * Doubles Feature Size and Search Size of Track Points without Feature Center keyframes on the selected layer
 * @author Adhish Yajnik <> <>
 * based on Paul Tuersley's forum post on AE Enhancers:
 * @version 1.0.0

	// make sure a comp is selected
	var activeItem = app.project.activeItem;
	if (activeItem == null || !(activeItem instanceof CompItem)){
		alert("You need to select a layer first.");

	} else {

		// make sure at least one layer is selected
		var selectedLayers = activeItem.selectedLayers;
		if (activeItem.selectedLayers.length == 0 ) {
			alert("You need to select a layer first.");

		} else {
			currentLayer = selectedLayers[0];

			// search top level properties for Motion Tracker
			for (var g = 1; g <= currentLayer.numProperties; ++g) {
				currentProperty =;

				if ( == "Motion Trackers") {

					// search for each tracker
					for (var h = 1; h <= currentProperty.numProperties; ++h) {
						currentTracker =;
						(function doubleTrackPointSize() {
							app.beginUndoGroup('Double Track Point Size');

							// search for each track point
							for (var i = 1; i <= currentTracker.numProperties; ++i) {
								currentTrackpoint =;
								// if a track point doesn't have any feature center keyframes, double its feature size and search size
								if ( < 1) {
									featSize =;
									searchSize =;*2);*2);
Post Reply