Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Error – no active camera?

  • Error – no active camera?

    Posted by Paul Gale on June 12, 2012 at 12:45 pm

    I’m using AE CS6 (v11.0.1.12) and have a strange error that I see has occured before in one or two posts.

    I’ve applied the auto orient on Y axis only expression from Dan’s site (thanks yet again Dan!) to the Y rotation of an illustrator layer. The comp is a pre-comp but has an active camera in both the main comp and pre-comp.

    I get the following error and the expression is disabled:

    No active camera at time xxxxx

    At first it was always at time -00:00:00:01 but then I purged all memory several times and then re-entered the expression. I briefly got it to work and the layer oriented in the Y axis but without touching anything, several seconds later I got the same error but at 00:00:20:00.

    Very weird – got to be a bug maybe unless I’m missing something?

    Any ideas?

    Thanks,

    Paul.

    delta = toWorld(anchorPoint) - thisComp.activeCamera.toWorld([0,0,0]);
    radiansToDegrees(Math.atan2(delta[0],delta[2]))

    Jordan House replied 8 years, 7 months ago 3 Members · 7 Replies
  • 7 Replies
  • Dan Ebberts

    June 12, 2012 at 3:03 pm

    I’m not seeing that error, but you should be able to work around it by changing activeCamera to layer(“Camera 1”)

    Dan

  • Paul Gale

    June 22, 2012 at 9:25 am

    Many thanks Dan,

    That solved it for that time – I’m still seeing the odd occurrence which is fixed by simply re-pasting in the expression (with activecamera) – something whacky going on somewhere!

  • Dan Ebberts

    June 22, 2012 at 4:02 pm

    The other thing you can try is wrapping the expression in a try/catch construct, like this:


    try{
    delta = toWorld(anchorPoint) - thisComp.activeCamera.toWorld([0,0,0]);
    radiansToDegrees(Math.atan2(delta[0],delta[2]))
    }catch(err){
    value
    }

    Dan

  • Paul Gale

    June 22, 2012 at 4:49 pm

    Does that only then evaluate the expression when there’s no error – therefore not disabling the experession if something odd is going on?

  • Dan Ebberts

    June 22, 2012 at 4:57 pm

    That’s correct.

    Dan

  • Paul Gale

    June 22, 2012 at 4:59 pm

    Great thanks Dan – will try that next time.

  • Jordan House

    September 13, 2017 at 2:12 pm

    Thanks!

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