The quitMAX() function lets you exit 3ds max under script control. This function is typically used in batch processing or render scripts. The function has the form:
If the #noPrompt optional argument is not specified and there are unsaved changes in the scene, 3ds max will prompt with its standard save changes dialog.
Additionally, you can control the scene save and undo states in 3ds max with the following functions:
lets you set the 3ds max system "dirty" flag. If this flag is set or there are entries in the Undo buffer, the user is asked if they want to save the scene file on a File > New or File > Reset.
returns true if the 3ds max system "dirty" flag is set to true or if the Undo buffer is not empty. If the Undo buffer if not empty, this function will still return true, even if you just called setSaveRequired false.
empties the Undo buffer, both providing a way to reset the undo state and another way to control the save-changes requester.
Normally, if there are entries in the Undo buffer when the scene is closed, 3ds max will prompt with a save-changes requester. In some cases, where you are controlling undo in MAXScript, you may want to force the need for a save-changes prompt.
The resetMAXFile() function lets you reset 3ds max under script control. This function is typically used in batch processing or render scripts. The function has the form:
If the #noPrompt optional argument is not specified and there are unsaved changes in the scene, 3ds max will prompt with its standard save changes dialog.