Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    COFFEE Undo Not Working In R10.x

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 318 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 05/11/2007 at 05:36, xxxxxxxx wrote:

        To be honest this loks like a hack. You shouldn't create nodes (object/tags/materials, etc.) from within an expression. An expression plugin with an interface where you can catch a button message is probably a better idea because this happens outside of the expression.

        cheers,
        Matthias

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 05/11/2007 at 15:30, xxxxxxxx wrote:

          Thanks for the guidance, Matthias. Looks like I'll have to create an interface for the plugin. Björn mentioned this on the CGTalk forum a couple of years ago too but I had forgotten.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post