When 3ds Max is exited or reset the save requester is only brought up if there is something on the undo stack. If a plug-in
makes a change that cannot be undone, a flag must be set that will indicate to the system that the save requester needs to
be brought up. There are three API functions related to this:
- GetSaveRequiredFlag() - Returns TRUE if the 'save required' flag is set; otherwise FALSE. Note: this method does not tell you if saving is required, it just returns the value of the 'save required' flag. To really
know if saving is required, you have to check the undo buffer as well as this flag. This is the purpose of IsSaveRequired() below.
- SetSaveRequiredFlag() - Sets the 'save required flag'. Note that calling SetSaveRequiredFlag( TRUE) will cause the 'Save Changes' prompt to appear, but SetSaveRequiredFlag( FALSE) will not prevent it from coming up unless you also reset the undo buffer.
- IsSaveRequired() - Returns TRUE if a change was made to the 3ds Max scene state that would require the file to be saved. In other words, it returns TRUE if the save requester will be brought up when the user exits, resets, etc.; otherwise FALSE.