Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions strange thisComp.activeCamera bug?

  • strange thisComp.activeCamera bug?

    Posted by Bryan Woods on September 29, 2015 at 11:24 pm

    Just noticing this happening all of a sudden for no reason.

    I’m using a simple expression to grab the position of the current active camera in the comp. Like this:

    lookAt(position,thisComp.activeCamera.position);

    However, all of a sudden, now it will disable its self randomly and say “there is no active camera on [some timecode]. Has anyone ever experienced this before? Its a very annoying bug and I’m not sure how to fix it other than hard coding the name of the camera (which I don’t want to do). Any thoughts?

    Dan Ebberts replied 10 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 29, 2015 at 11:53 pm

    If the expression needs to access data before time zero for some reason, you’ll get that because (I’m assuming) there is no active camera then. I’ve seen that happen mostly when the Graph Editor is active.

    Dan

  • Bryan Woods

    September 30, 2015 at 3:35 am

    So what have you done in the past to fix this? This code is just sitting in an orientation layer property. My camera is the length of the comp so there shouldn’t be any issues “finding” a camera at any point in the timeline.

  • Dan Ebberts

    September 30, 2015 at 4:55 am

    I’d say try this:

    try{
    lookAt(position,thisComp.activeCamera.position);
    }catch(e){
    value;
    }

    Dan

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