How to know camera Lens from camera in stageGraph ?

   2518   2   0
User Avatar
Member
19 posts
Joined: Dec. 2018
Offline
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
User Avatar
Member
9744 posts
Joined: July 2007
Offline
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;
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
19 posts
Joined: Dec. 2018
Offline
Exactly what I needed thanks so much Thomas !
  • Quick Links