Avoid activeCamera errors by checking if activeCamera exist?
Posted: March 3rd, 2012, 8:31 am
I have created some expressions that work in conjunction with a camera brought in from a 3D app. Because I am frequently swapping out the camera for a new one, I am using thisComp.activeCamera rather than a hard link. Of course this means that if the camera ends before the comp, it will error and disable every one of my expressions.
I'd like to think it is possible to put my whole expression in an if statement checking if an activeCamera exists. I have tried some things without success, but was curious if anyone had a better idea of how to do it.
These both still error:
I'd like to think it is possible to put my whole expression in an if statement checking if an activeCamera exists. I have tried some things without success, but was curious if anyone had a better idea of how to do it.
These both still error:
Code: Select all
if (thisComp.activeCamera){
}
Code: Select all
if (thisComp.activeCamera != null){
}