Generate MaxScript to filename

Generate MaxScript to filename
Changed for MaxScript

Changed for MaxScript
Changed for MaxScript Generator

Fixed some bugs that are not really code in 3D Studio Max.
Added a global variable called structureHistoriesInDefinedOrder to the m3 module.