I wonder if by using a large nozzle, you could print out the entire sensor by laying out lengths of TPU with flexible joints at each air gap. It would depend on how well light traveled through the printed part though.
3D printing does affect the light passing through significantly. There are a number of options for fabricating these but most of the successful ones involve cutting (can even use a laser cutter).