reposition anchor point

What type of scripts do you need?

Moderator: byronnash

Post Reply
Varangian
Posts: 38
Joined: December 16th, 2004, 11:15 am

this seems like a perfect task for a script.

I often need to reposition a layers anchor point to the exact edge or corner of a layer. Particularly when I am joining layers in 3D space and I need the edges to line up correctly when animated.
This is not precisely done with the pan behind tool, and changing the value numerically repositions the layer in your comp.

Here is my script idea: a pop up window that asks if you want the anchor point repositioned to the:
1: top Left corner
2: top Right corner
3: bottoe Right corner
4: bottom Left corner
5: Left edge (centered in y space)
6: Right edge (centered in y space)
7: Top edge (centered in x space)
8: Bottom edge (centered in x space)

it would perform the function, but NOT move your layer in the comp.

I have no idea how to do this, but it sure would be handy!
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

hi Varangian,
that's a good idea !
I've written something that apparently does the job; the script should work on AE6.5 and AE7.
notes:
-perform the operation before applying any rotation, orientation or scale modification on the selected layers
-do not select camera, light or text layers
hope that helps
http://www.nabscripts.com/Forum/Scripts ... rPoint.jsx
Varangian
Posts: 38
Joined: December 16th, 2004, 11:15 am

hey nab, looks like the link doesn't work.
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

probably a temporary problem with the server...
I've modified slightly the script that creates now two keyframes (on the position property and anchorPoint) at the current comp time
Varangian
Posts: 38
Joined: December 16th, 2004, 11:15 am

thanks nab, that's awesome!!!
aparma
Posts: 1
Joined: January 25th, 2006, 2:03 pm
Location: Manila, Philippines
Contact:

hi,

can this script be modified so that it takes a mask into consideration? meaning, it considers the mask bounderies as the layer edges? thanks.
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

that should be doable, I'll give it a try...
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

Here is the modified version (in fact 100% rewritten): RepositionAnchorPoint.zip

For mask bounding box, there are two options which are illustrated below.
- Mask Bounding Box (AE) includes Bezier handles in the bounding box
- Mask Bounding Box (Nab) uses more advanced calculations to determine the 'true' bounding box

Image
pants
Posts: 22
Joined: October 8th, 2004, 8:35 am

Hey nab,

is there any way to get this script to work on a text layer too?

Thanks
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

yes...check your PM :wink:
pants
Posts: 22
Joined: October 8th, 2004, 8:35 am

Thank you!
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

Website problem solved :D

here is the new version of this script: RepositionAnchorPoint.zip
Post Reply