I am developing a python command to perform a custom export process. During the process changes will be made to the document (changing selection, adding objects, renaming objects…). At the end of the export (or in the case of an exception) I would like all changes to the document to be reverted.
After the script executes, undo will correctly revert all changes.
During the script execution this does not work:
Undo (returns false) / 'rs.Command("_Undo")
(printsNothing to undo.`).
I have tried
BeginUndoRecord (returns 0) /
EndUndoRecord (returns False). Looking at
AddCustomUndoEvent it appears that this pertains only to plugin data.