How to know camera Lens from camera in stageGraph ?

   1879   2   0
User Avatar
Member
19 posts
Joined: 12月 2018
オフライン
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
9279 posts
Joined: 7月 2007
オンライン
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: 12月 2018
オフライン
Exactly what I needed thanks so much Thomas !
  • Quick Links