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

ExtendScript: Determine wether a camera layer is "One-Node Camera" or "Two-Node Camera"

Explorer ,
Sep 05, 2024 Sep 05, 2024

Copy link to clipboard

Copied

No documentation found of how to make that determination using ExtendScript.

In order to work around that I'm currently using the following hack:

const isTwoNodeCamera = camera.pointOfInterest.canSetExpression;

Is there a better and safer way?

TOPICS
How to , Scripting

Views

56

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
Community Expert ,
Sep 05, 2024 Sep 05, 2024

Copy link to clipboard

Copied

LATEST

I recently looked into this and couldn't find a way to specify the type of camera.

I'm not sure if your way is particularly unsafe, as `canSetExpression` returns a boolean value. 

Alternatively, maybe you can use a try/catch to simply see if you can access the pointOfInterest property? If not, you can move on to the rest of your code.

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