Separating USB/MCU power buses
Your schematic seems to have a bug.  If you apply +5V from USB, then D1 is reverse-biased, and μC wouldn't get +5V.

Here's what I can propose instead.  Of course, this is just a rough diagram, which shows only power distribution.



FTDI chip is bus powered only always.
When +12V source is not present, the gates of Q17 and Q18 are pulled low and the +5V rail is powered from USB.
When +12V source is present, the gates of Q17 and Q18 are pulled high and the USB section is not self-powered from the +12V supply.

MOSFET body diodes are the reason for having two MOSFETs back-to-back instead of just one.  This is to prevent the USB host from getting back-powered.