Copy link to clipboard
Copied
In previous versions (24.6.4) expression calls to "thisComp.activeCamera" when there is no Camera layer present in the composition returns "Default" (falls back to the Default 3D camera). In 25.1 it produces an error "No active camera at time 00:00:00:00".
Wrapping these calls in a try/catch moving forward.
Stats: Windows 11 23H2,
12th Gen Intel(R) Core(TM) i7-12700H 2.30 GHz
Copy link to clipboard
Copied
Hi @AndRobots,
Thanks for posting about this. I just tried using `thisComp.activeCamera` in AE 22.6 and the result is the same as 25.1 if there are no 3D layers (the "No active camera..." error is shown).
It appears that the Default camera is only accessible if there is a 3D layer present, so wrapping those calls in a try/catch has been/remains the most concise way to avoid an error if there aren't any 3D layers present. You could certainly go the route of looping over the comp layers and determining if there are any 3D ones, but that would be both slow and overly-verbose compared to the try/catch.
Cheers,
- John, After Effects Engineering Team