How do I use AddUndo with MergeDocument()?
-
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:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) :---------
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.
Juergen
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/03/2010 at 04:52, xxxxxxxx wrote:
As an addition: This is what I try to do:
doc->StartUndo(); if (!MergeDocument(doc,bodyFile,SCENEFILTER_MATERIALS|SCENEFILTER_OBJECTS,NULL)) { GePrint(GeLoadString(IDS_s**cE_ERROR_BODYOBJECT)); bodyOp = BaseObject::Alloc(Onull); doc->InsertObject(bodyOp,NULL,NULL); doc->AddUndo(UNDO_NEW, bodyOp); //add an undo for the insertion } else { doc->AddUndo(????); //add an undo for the MergeDocument ? }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
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.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2010 at 03:23, xxxxxxxx wrote:
I am fine with the automatic undo. Thanks for the info.