It seems that there is a rvtypes.State.unsavedChanges attribute according to the Help > MU Command API Browser. However, the attribute doesn’t seem to be available on any way I try to access the state:
import rv
state = rv.commands.data()
state.unsavedChanges # does not exist
state = rv.rvtypes.State()
state.unsavedChanges # does not exist
state = rv.rvui.newStateObject()
state.unsavedChanges # does not exist
Is there any way from python to detect whether there are any unsaved changes?