Undo's and SendModelingCommand
pim last edited by
I am not sure how to / where to place Undo's when using a CSTO.
Should it be before (with an UNDOTYPE_CHANGE) or after (with an UNDOTYPE_NEW)?
#doc.AddUndo(c4d.UNDOTYPE_CHANGE, poly) objList = c4d.utils.SendModelingCommand( command = c4d.MCOMMAND_CURRENTSTATETOOBJECT, list = [poly], mode = c4d.MODELINGCOMMANDMODE_ALL, doc = doc, ) doc.AddUndo(c4d.UNDOTYPE_NEW, objList)
m_adam last edited by
Hi @pim only UNDOTYPE_NEW is needed.
Moreover, I would like to mention that SendModelingCommand offers the
MODELINGCOMMANDFLAGS_CREATEUNDOflags in order to automatically creates undo.