Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    ObjectData plugin Undo()

    SDK Help
    0
    2
    152
    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
      Helper
      last edited by

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

      On 28/07/2007 at 10:13, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      me again,

      I'm at the point where I want to be able to do undos.

      I have a GeDynamicArray where I store the map points, I want to be able to undo changes in this array, but when I call
      doc->AddUndo(UNDO_CHANGE, (void* )this); I crash??
      any ideas?

      I don't think C4D knows about this array within my class, so how do I go about adding this data to an undo?

        
      Bool AIMap::AddLink(BaseDocument* doc, Real mx, Real my, BaseDraw* bd) {  
      doc->AddUndo(UNDO_CHANGE, (void* )this);  
      return AddLink(doc, linkSelection.index[0], linkSelection.index[1]);  
      }  
      

      best, Julio

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

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

        On 28/07/2007 at 11:35, xxxxxxxx wrote:

        Can't do it. Undos are basically limited to BaseList2D derived objects (the docs really should be updated to mention what can be added for undo and what cannot - hint). You'll need to store the object in these cases: doc->AddUndo(UNDO_CHANGE, op). And I'm not certain that'll track changes to your GeDynamicArray so you'll need to see if it updates consistently.

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