Search - User list
Full Version: How to know camera Lens from camera in stageGraph ?
Root » Solaris and Karma » How to know camera Lens from camera in stageGraph ?
adrienlambert
Hi !

Quick question about imported cameras from other software that appear in camera's stage graph, is there a way to figure out the focal length ? maybe a way to extract it in VEX or python ?

Cheers
tamte
if you look at the SG Details view for your camera primitive you should see focalLength attribute

let's assume the camera path is "/cameras/camera1, then you can access it in Attribute Wrangle LOP using:
float focal = usd_attrib(0, "/cameras/camera1", "focalLength");

or if you are running the wrangle directly on "/cameras/camera1" then you can also just bind it using @:
float focal = f@focalLength;
adrienlambert
Exactly what I needed thanks so much Thomas !
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB