import bpy bpy.context.camera.sensor_width = 15.81 bpy.context.camera.sensor_height = 8.88 bpy.context.camera.sensor_fit = 'HORIZONTAL'