2 Replies Latest reply: Nov 23, 2014 2:22 PM by bpoole24 RSS

    Change Camera Auto Orientation with Script

    bpoole24 Community Member

      Hello,

       

      I'm trying to figure out how to change the auto-orient setting for a camera in my script. From page 41 of the AE scripting guide it looks like I should be able to affect auto orient with

      " app.project.item(index).layer(index).autoOrient " this allows me to pull up a numeric value for auto orient, however, I'm not really sure how I could go about setting this to a false, I've tried assigning it to false directly but that doesn't seem to work. The guide says to use "AutoOrientType.NO_AUTO_ORIENT " But this if I try something like this I'm just getting undefined returned:


      var myProj = app.project

      var myComp = myProj.activeItem

      var targetLayer = myComp.selectedLayers[0]

      targetLayer.autoOrient.AutoOrientType.NO_AUTO_ORIENT

       

      Can anyone point me in the right direction, what am I doing wrong here?

       

      Thanks!