Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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
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 ? }
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
On 03/03/2010 at 03:23, xxxxxxxx wrote:
I am fine with the automatic undo. Thanks for the info.