Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Add camera with 35mm preset and default position

  • Add camera with 35mm preset and default position

    Posted by Jake Hawley on August 15, 2010 at 8:22 pm

    Hey there. Two questions.

    I’ve looked around for a few hours but haven’t found anything that will allow me to add a camera and set it to 35mm.

    Also, Would like to position the camera at it’s default position. by default I mean how AE adds a camera when you do it through the menu bar.

    The script I’m working on is fairly simple. Adding a null and parented camera to an active comp. I’ve checked out a few camera rigging scripts but wanted something to how I already work with cameras.

    Thanks,
    Jake


    app.beginUndoGroup("Camera and Null");

    var myComp = app.project.activeItem;

    ///CREATE CAMERA///

    var w = myComp.width /2 ;
    var h = myComp.height /2 ;
    var newCamera = myComp.layers.addCamera("Camera",[w,h]);

    ///CREATE NULL///
    var myNull = myComp.layers.addNull();
    myNull.threeDLayer = true;

    ///RENAMES NULL//
    myNull.name = "Camera Control";

    ///PARENTS CAMERA TO NULL//
    myComp.layer("Camera").parent = myNull;

    Jake Hawley replied 15 years, 9 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy