Here's how to get some settings from a camera.
Focal Length is the parameter you have access to.. it is the lens in millimeters. If oyu need the lense FOV in degrees you'll have to come up with the conversion.. I can't find a way to query the camera for it even though the camera has a Angle of View setting (same as Field of View).
getAttr persp.focalLength;
getAttr persp.focusDistance;
getAttr persp.shutterAngle;
getAttr persp.centerOfInterest;
getAttr persp.horizontalFilmAperture;
getAttr persp.verticalFilmAperture;
getAttr persp.fStop
The basic formula for extracting info from attributes is that the first word is lowercase and the following words have the first letter capitalized.
Okay this may help you..
proc float AEcalculateFOV( string $focalStr, string $horStr )
{
float $focal = getAttr $focalStr
;
float $aperture = getAttr $horStr
;
float $fov = (0.5 * $aperture) / ($focal * 0.03937);
$fov = 2.0 * atan ($fov);
$fov = 57.29578 * $fov;
return $fov;
}
from:
C:AWMaya4.0scriptsAETemplatesAEcameraTemplate.mel
g