I'm trying to set a background image to a camera using python, but no luck so far. The background image checkbox on the camera item is checked, but no file is loaded.
Also, I'm actually trying to load an image-sequence, not a still image.
filepath = "D:/path/to/image_seq.jpg"
img = bpy.data.images.load(filepath)
# cam is a camera object.
cam.data.show_background_images = True
bg = cam.data.background_images.new()
bg = img