import bpy bpy.context.object.data.sensor_width = 9.6 bpy.context.object.data.sensor_height = 5.4 bpy.context.object.data.sensor_fit = 'HORIZONTAL'