Skip to main content
Participating Frequently
Sep 5, 2024 11:02 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
Sep 5, 2024 1:16 PM UTC

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