import bpy bpy.context.object.data.sensor_width = 12.52 bpy.context.object.data.sensor_height = 7.41 bpy.context.object.data.sensor_fit = 'HORIZONTAL'