import maya.cmds as mc
def camLock():
currentMP = mc.playblast(activeEditor =True)
currentMP = currentMP.split("|")[-1]
currentCam = mc.modelPanel(currentMP, q=True, camera=True)
currentCamShape = mc.listRelatives(currentCam)
print(currentCamShape)
focalLength = mc.getAttr("{}.focalLength".format(currentCam))
print(focalLength)
aperture = cmds.getAttr(currentCam + '.cameraAperture')
print(aperture)
camLock()
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme