Scene State Changes that Cannot be Undone
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()
- ReturnsTRUE
if the 'save required' flag is set; otherwiseFALSE
. 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 ofIsSaveRequired()
below.SetSaveRequiredFlag()
- Sets the 'save required flag'. Note that callingSetSaveRequiredFlag
( TRUE) will cause the 'Save Changes' prompt to appear, butSetSaveRequiredFlag
( FALSE) will not prevent it from coming up unless you also reset the undo buffer.IsSaveRequired()
- ReturnsTRUE
if a change was made to the 3ds Max scene state that would require the file to be saved. In other words, it returnsTRUE
if the save requester will be brought up when the user exits, resets, etc.; otherwiseFALSE
.