//****************************** SUBROUTINES function Bake(theComp, propBeingCopied, propBeingWritten) { StartBake=theComp.workAreaStart; EndBake=StartBake+theComp.workAreaDuration; NextFrame=1/theComp.frameRate; for (var i=StartBake; i .0005){c = -Math.atan2(v[0],u[0]);a = -Math.atan2(w[1],w[2]);}else{a = Math.atan2(u[1],v[1]);c = 0;}[radians_to_degrees(a),radians_to_degrees(b),radians_to_degrees(c)]"; theComp.layers.addCamera("CameraCopy 2",[0,0]).startTime=0; CamCopy02=theComp.layer(1); CamCopy02.position.expression="thisComp.layer('CameraCopy 1').position"; CamCopy02.pointOfInterest.expression="position"; CamCopy02.rotationX.expression="thisComp.layer('CameraCopy 1').orientation[0]"; CamCopy02.rotationY.expression="thisComp.layer('CameraCopy 1').orientation[1]"; CamCopy02.rotation.expression="thisComp.layer('CameraCopy 1').orientation[2]"; CamCopy02.zoom.expression="this_comp.layer("+"\'"+CameraName+"\'"+").zoom"; theComp.layers.addCamera("Baked Camera",[0,0]).startTime=0; CamCopy03=theComp.layer(1); Bake(theComp, theComp.layer(2).position, CamCopy03.position); CamCopy03.pointOfInterest.expression="position"; Bake(theComp, theComp.layer(2).rotationX, CamCopy03.rotationX); Bake(theComp, theComp.layer(2).rotationY, CamCopy03.rotationY); Bake(theComp, theComp.layer(2).rotation, CamCopy03.rotation); Bake(theComp, theComp.layer(2).zoom, CamCopy03.zoom); theComp.layer(3).remove(); theComp.layer(2).remove(); alert("Turn off the auto-orientation on the baked camera"); //****************************** END