1st Script: add camera + nulls + parenting

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
HEADSQUARED
Posts: 1
Joined: March 25th, 2008, 12:53 pm

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
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
Post Reply