import bpy bpy.context.object.data.sensor_width = 17.31 bpy.context.object.data.sensor_height = 12.98 bpy.context.object.data.sensor_fit = 'HORIZONTAL'