The charging system is connected directly to the battery without a switch and with any fusible link. The battery drain isolation is provided by the rectifier diodes that only allow current to flow from alternator to battery. However, if these diodes fail in a shorted condition, the windings of the alternator are subsequently connected directly across the battery terminals. The alternator stator windings have very low resistance, causing very high current draw. The interconnecting wires and connector terminals cannot dissipate the heat without melting the wire insulation. I've seen such failures also melt the connectors and plating off the contacts in the connectors. The wire harness can also have the insulation of adjacent wires damaged, as the ground currents travel the wire terminated to frame near the coil mount.
Did you charge or jumper the battery before your ride? Did you reverse the charger connections?
This is the most likely cause, I think. Although, there are some battery failure modes that can draw excessive current from the charging system and melt wire insulations, too. A failed cell in the battery can keep the voltage at the regulator low and it will tell the alternator to put out full power, even through the remaining cells can accept no more charge. However, if your battery can be recharged to it's full 14.5 volt potential, then the rectifier is the more likely culprit. The rectifier can be checked rather easily with a multimeter.
Best of luck!