import bpy bpy.context.object.data.sensor_width = 6.16 bpy.context.object.data.sensor_height = 4.62 bpy.context.object.data.sensor_fit = 'HORIZONTAL'