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