Page 1 of 1

reposition anchor point

Posted: March 13th, 2006, 5:14 pm
by Varangian
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!

Posted: March 14th, 2006, 5:48 pm
by nab
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

Posted: March 15th, 2006, 12:37 pm
by Varangian
hey nab, looks like the link doesn't work.

Posted: March 15th, 2006, 6:11 pm
by nab
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

Posted: March 16th, 2006, 9:06 am
by Varangian
thanks nab, that's awesome!!!

Re: reposition anchor point

Posted: March 11th, 2008, 8:24 pm
by aparma
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.

Re: reposition anchor point

Posted: March 15th, 2008, 12:54 pm
by nab
that should be doable, I'll give it a try...

Re: reposition anchor point

Posted: March 16th, 2008, 12:13 am
by nab
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

Re: reposition anchor point

Posted: March 24th, 2008, 12:05 pm
by pants
Hey nab,

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

Thanks

Re: reposition anchor point

Posted: March 25th, 2008, 11:39 pm
by nab
yes...check your PM :wink:

Re: reposition anchor point

Posted: March 26th, 2008, 9:16 am
by pants
Thank you!

Re: reposition anchor point

Posted: March 26th, 2008, 4:25 pm
by nab
Website problem solved :D

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