import bpy bpy.context.camera.sensor_width = 23.1 bpy.context.camera.sensor_height = 15.4 bpy.context.camera.sensor_fit = 'HORIZONTAL'