Skip to main content
Participating Frequently
September 5, 2024
Question

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

  • September 5, 2024
  • 1 reply
  • 189 views

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?

This topic has been closed for replies.

1 reply

Inspiring
September 5, 2024

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.