import bpy bpy.context.object.data.sensor_width = 15.81 bpy.context.object.data.sensor_height = 8.88 bpy.context.object.data.sensor_fit = 'HORIZONTAL'