ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Error - no active camera?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Paul Gale
Error - no active camera?
on Jun 12, 2012 at 12:45:16 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]))


Return to posts index

Dan Ebberts
Re: Error - no active camera?
on Jun 12, 2012 at 3:03:43 pm

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


Dan



Return to posts index

Paul Gale
Re: Error - no active camera?
on Jun 22, 2012 at 9:25:20 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!


Return to posts index


Dan Ebberts
Re: Error - no active camera?
on Jun 22, 2012 at 4:02:33 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



Return to posts index

Paul Gale
Re: Error - no active camera?
on Jun 22, 2012 at 4:49:50 pm

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


Return to posts index

Dan Ebberts
Re: Error - no active camera?
on Jun 22, 2012 at 4:57:24 pm

That's correct.

Dan



Return to posts index


Paul Gale
Re: Error - no active camera?
on Jun 22, 2012 at 4:59:47 pm

Great thanks Dan - will try that next time.


Return to posts index

Jordan House
Re: Error - no active camera?
on Sep 13, 2017 at 2:12:42 pm

Thanks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]