Detecting unsaved changes
nicholas_yue last edited by
Is there a call to c4d to ascertain if there are unsaved changes in the current session. The current session was started from opening a file from disk.
I am using R21 on Windows and using Python.
m_adam last edited by m_adam
Hi @nicholas_yue this is indeed something not documented but you can know it by accessing the
c4d.DOCUMENT_USERCHANGEparameter of a document.
doc = c4d.documents.GetActiveDocument() isChanged = bool(doc[c4d.DOCUMENT_USERCHANGE])
c4d.DOCUMENT_USERCHANGEis an integer that can have 3 values:
- 0 means there is no change
- 1 means there is a change in the scene.
- 2 means there is a change from the undo stack.
PluginStudent last edited by