import bpy bpy.context.object.data.sensor_width = 22.2 bpy.context.object.data.sensor_height = 14.7 bpy.context.object.data.sensor_fit = 'HORIZONTAL'