THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/03/2010 at 04:48, xxxxxxxx wrote:
Cinema 4D Version: 10
Platform: Windows ;
I am inserting objects from one C4D file into another using MergeDocument().
If I want to add undo for that, how do I use the AddUndo()?
Do I have to put a UNDO_NEW for each object inserted? Or do I have to put a UNDO_CHANGE before the MergeDocument command? In the latter case, what pointer do I need to pass in the AddUndo(type,pointer) command?
Thanks for help.
On 02/03/2010 at 04:52, xxxxxxxx wrote:
As an addition: This is what I try to do:
bodyOp = BaseObject::Alloc(Onull);
doc->AddUndo(UNDO_NEW, bodyOp); //add an undo for the insertion
doc->AddUndo(????); //add an undo for the MergeDocument ?
On 02/03/2010 at 07:38, xxxxxxxx wrote:
MergeDocument() automatically creates an undo step. If want to have more control you have to use LoadDocument() and merge the objects manually.
On 03/03/2010 at 03:23, xxxxxxxx wrote:
I am fine with the automatic undo. Thanks for the info.