import bpy bpy.context.object.data.sensor_width = 24.4 bpy.context.object.data.sensor_height = 13.5 bpy.context.object.data.sensor_fit = 'HORIZONTAL'