Page 1 of 1

1st Script: add camera + nulls + parenting

Posted: March 28th, 2008, 12:12 pm
by HEADSQUARED
So I am writing my first Script and I have only been able to figure out Step 1.
Steps include:

1. Create Camera and 3D Nulls
Image

Code: Select all

var newCamera = activeItem.layers.addCamera("Camera 1",[360.0,270.0]);

newCamera.property("position").setValue([ 360, 270, -900]);
newCamera.property("anchorPoint").setValue([ 360, 270, 0]); 

for (var b = 1; b <= 5; ++b){

var curLayer = activeItem.layer(b);

var firstComp = app.project.activeItem; 
var my3DNull = firstComp.layers.addNull(10);
my3DNull.threeDLayer = true;
2. Select All :: don't know if I need this step?

3. Parented stack starting with the camera.
Ending up with this:
Image

Thanks for any help.
HEAD

Re: 1st Script: add camera + nulls + parenting

Posted: April 4th, 2008, 1:21 pm
by lloydalvarez
Hey head,

Take a look at my LayerChain script for an example of doing what you are asking..

http://aescripts.com/2008/03/18/parent-chain/

-Lloyd