import bpy bpy.context.object.data.sensor_width = 22.3 bpy.context.object.data.sensor_height = 14.9 bpy.context.object.data.sensor_fit = 'HORIZONTAL'