• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

thisComp.activeCamera expression error in 25.1

Community Beginner ,
Dec 21, 2024 Dec 21, 2024

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

TOPICS
Expressions

Views

39

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 08, 2025 Jan 08, 2025

Copy link to clipboard

Copied

LATEST

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 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines