THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/11/2007 at 05:18, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.x
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
---------
I am trying unsuccessfully to have COFFEE undo the creation of a base tag in R10.x.
Undo calls work perfectly in the following example in R9.6 but have no effect in R10.x. (This code goes into a COFFEE expression tag with a Boole user data element to trigger creation of a display tag.)
> _
> main(doc, op)
> {
> var ttag = op- >GetFirstTag();
>
> while(ttag->GetType() != Tcoffeeexpression)
> {
> ttag = ttag->GetNext();
> }
>
> var addTag = ttag#ID_USERDATA:1;
>
> doc->StartUndo();
>
> if(addTag)
> {
> var dispTag = AllocTag(Tdisplay);
> op->InsertTag(dispTag);
> doc->AddUndo(UNDO_NEW, dispTag);
> }
>
> ttag#ID_USERDATA:1 = FALSE;
> doc->EndUndo();
> }
> _
Can anyone tell me why this is not working in R10.x?