THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/02/2006 at 11:40, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.0+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
---------
Howdy,
Here's the problem:
From a CommandData plugin, I'm adding 3 tags to the document and making one of them the active tag. This is all being done between a StartUndo()/EndUndo() call, but setting the tag as the active tag is not being logged into the undo group, and it takes two undos to undo the command.
doc->StartUndo();
//...allocate and add tagA code here
doc->AddUndo(UNDO_NEW,tagA);
//...allocate and add tagB code here
doc->AddUndo(UNDO_NEW,tagB);
//...allocate and add tagC code here
doc->AddUndo(UNDO_NEW,tagC);
doc->SetActiveTag(tagB);
doc->EndUndo();
I see there is an UNDO_ACTIVATE flag, but the SDK documentation says this:
**UNDO_ACTIVATE
Automatically managed by SetActiveObject()/Tag()/Material() etc. No need to use manually.**
But it doesn't seem to add it to the undo group.
I did try adding the line:
doc->AddUndo(UNDO_ACTIVATE, tagB);
...both before and after the SetActiveTag() call, but neither one had an effect, and it still takes two undos to undo the command.
Any ideas?
Adios,
Cactus Dan