I need to find some parameter of the stereo camera. In particular I need:
- The distance of the near and far plane and where are them (for calculate the dimensions, the position of the vertices of the panel, etc.)
- Where exactly is the volume of the camera situated (the volume you can see if you enable the option in the 3D view generic properties)
The formula used to calculate this data in blender (who knows where the file with this formula is?
import bpy scene = bpy.context.scene cam = scene.camera print("convergence_distance: %f" %cam.data.stereo.convergence_distance) print("convergence_mode: %r" %cam.data.stereo.convergence_mode) print("interocular_distance: %f" %cam.data.stereo.interocular_distance) print("pivot: %s" %cam.data.stereo.pivot) print("focal_length: %f" %cam.data.lens) print("gpu_dof.focal_length: %f" %cam.data.gpu_dof.focal_length) print("gpu_dof.focus_distance: %f" %cam.data.gpu_dof.focus_distance) print("gpu_dof.is_hq_supported: %s" %cam.data.gpu_dof.is_hq_supported) print("lens_unit: %s" %cam.data.lens_unit) print("sensor_width: %f" %cam.data.sensor_width) print("clip_end: %f" %cam.data.clip_end) print("rotation_euler: x = {0}, y = {1}, z = {2}".format(*cam.rotation_euler)) print("location: x = {0}, y = {1}, z = {2}".format(*cam.location)) print("sensor_height: %f" %cam.data.sensor_height) print("sensor_width: %f" %cam.data.sensor_width) print("angle: %f" %cam.data.angle) print("angle_x: %f" %cam.data.angle_x) print("angle_y: %f" %cam.data.angle_y) print("cam.matrix_local") print(cam.matrix_local) print("cam.matrix_basis") print(cam.matrix_basis) print("cam.matrix_world") print(cam.matrix_world) print("cam.calc_matrix_camera(x=1, y=1, scale_x=1.0, scale_y=1.0)") print(cam.calc_matrix_camera(x=1, y=1, scale_x=1.0, scale_y=1.0))**
with this code i have some camera parameters but i don't know how to find the others.
tips?