MayaのAngle Of VIewは内部計算値なのでGetできない。
def get_aov(self):
import math
focalLength = cmds.getAttr('perspShape.focalLength')
horizontalFilmAperture = cmds.getAttr('perspShape.horizontalFilmAperture')
Aov = 2.0 * math.atan( ( horizontalFilmAperture * 25.4 ) / ( focalLength*2.0 ) )
#Aov = 2 * math.atan(float(horizontalFilmAperture) / (2*float(focalLength)))
Aov = math.degrees(Aov) # 19.2600082544
Aov = round(Aov, 2)
return Aov
コメント