Undercarriage, unless an integral part of the exterior of the model (as with the spats on a Ju-87), are always something I make, paint up and then leave off until after final painting is complete. They are just far too fragile to survive filling, sanding, masking and painting of the whole model to worry about when painting your aircraft. Landing gear bays I usually spray at the same time as the cockpit (they are often the same colour), and then mask off with damp tissue and Humbrol Maskol.