AE ENHANCERS

Expressions/Scripts/Presets
It is currently Thu May 23, 2013 4:24 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Script to postion an anchor point in middle of layer
PostPosted: Tue Apr 28, 2009 8:53 am 
Offline

Joined: Tue Mar 25, 2008 4:33 pm
Posts: 5
Hey guys,
I have no scripting knowledge and am starting to figure out expressions so i'll be relying on your help for this one
(if it's possible)

lets say i create a 1080p solid where i draw a mask around only one little part of it on the left hand side. Then when i select that layer my anchor point is where it was before and not in the middle of my mask.

Would it be possible to create a script that would center the anchor point to the mask area without moving the mask around? so what it would need to do is move the anchor point to the new middle (which will move the mask to the middle of the comp) and then have to move the solid to it's original x,y,z coordinates so it matches the original position of the mask.

Any ideas?
Thanks in advance!
Ollie


Top
 Profile  
 
 Post subject: Re: Script to postion an anchor point in middle of layer
PostPosted: Tue Apr 28, 2009 10:18 am 
Offline

Joined: Fri Dec 07, 2007 10:11 am
Posts: 128
Check out this script (script from Nabscripts.com and modified for Video Copilot).
I don't know where you can find the script by itself... here it is boundeled with a project file:
http://www.videocopilotstore.net/208b91bb69c7d5c1f791128e7cdc7b82/videotutorials/projects/86.zip
unzip the file to extract: MasksToLayers.jsx (from "Script" folder)

This script will duplicate your layer and will reposition the anchor point at the center of the mask.
In case you have several masks on that layer, the script will duplicate the layer for each mask you have on it (each duplicate will contain only one mask) and it will reposition the anchor point of each duplicate at the center of its mask.

I hope this helps.

Koby.


Top
 Profile  
 
 Post subject: Re: Script to postion an anchor point in middle of layer
PostPosted: Tue Apr 28, 2009 3:45 pm 
Offline

Joined: Tue Mar 25, 2008 4:33 pm
Posts: 5
oh wow man!
thanks so much for the info. i'll download and give it a spin!

thanks again!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group