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

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

Explorer ,
Sep 05, 2024 Sep 05, 2024

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
166
Translate
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
Valorous Hero ,
Sep 05, 2024 Sep 05, 2024
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.

Translate
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