Hey Guys,
Total Noob to all this scripting stuff, but I'm loving it so far!
I've got a problem where, I'm using the following to try and add a camera to my comp:
var myComp = app.project.activeItem;
var myLayers = myComp.layers;
app.beginUndoGroup("New Cam");
myLayers.addCamera("cam", [0,0]);
myLayers.addNull();
myComp.layer(1).name = "CAM_NULL";
myComp.layer(2).parent = myComp.layer(1);
app.endUndoGroup();
The problem I'm having is that when I just add a camera and a null using the UI, they are set up all centred nice and the other layers in my scene don't change. But, when I use my script, it seems like all of the layers in my comp shift to the right and down. I'm noticing this is because when I add the camera using the script, the Point of Interest and Position values for the camera go from (0,0,0) to (-960, -540, 0) when they get parented to the CAM_NULL. :/
Anyhow, any input as to why this might be happening?