script to align layers between two points in 3d space
Posted: June 23rd, 2009, 9:40 am
I just wrote a script trajectory. It creates two 3d nulls at the bottom of the composition. It will then take every layer in the composition, make them 3d and put a position expression that will distribute all the layers on a line between the two points. Once finished you can move the nulls and the layers will stay distributed between the points.
you can get the script at http://michaelcardeiro.com/aeScripts/ it is right below the spellcheck script
The only flaky part about it is that the z positions of the nulls need to be different otherwise the script tries to do a division by zero and throws an error. I really don't understand the math (sure wish I'd paid more attention in school instead of thinking I would never need this math) and because of that it took quite a while to come up with an algorithmm that worked...but I don't understand it enough to modify it to work when both z values are the same.
you can get the script at http://michaelcardeiro.com/aeScripts/ it is right below the spellcheck script
The only flaky part about it is that the z positions of the nulls need to be different otherwise the script tries to do a division by zero and throws an error. I really don't understand the math (sure wish I'd paid more attention in school instead of thinking I would never need this math) and because of that it took quite a while to come up with an algorithmm that worked...but I don't understand it enough to modify it to work when both z values are the same.