Maxon Developers
    • Downloads
      • All Downloads
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
      • Cinema 4D Python Examples
      • Cinema 4D C++ Examples
      • Project Tool
      • SDK Database
    • Documentation
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
    • Forum
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Forums
      • Overview
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • News & Information
      • Downloads
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Undo and CustomDatatype

    SDK Help
    0
    4
    124
    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 20/02/2006 at 12:44, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.5 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi!
      I need to save some points arrays in my Plugin.  Thus, I have used the CustomDataType functions and it works fine.  Now, I try to add Undo actions.  My question is simple : how use the BaseContainer::AddUndo(LONG type, void *data) when data points to a element of a CustomDataType?
      If the variable with the type of my CustomDataType is called MyData and contains the element Vector *arr, when I type
      BaseDocument *doc = GetActiveDocument;
      doc->AddUndo(UNDO_CHANGE, MyType.arr);
      Cinema4D crashes.
      Is there an explanation or must I explain more about my code?
      Thanks.

      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 22/02/2006 at 11:36, xxxxxxxx wrote:

        You can't use AddUndo() in this way. The data must be included in the document. So you need to put this custom data type into the container of such an instance (e.g. an object).

        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 26/02/2006 at 04:14, xxxxxxxx wrote:

          Ok, thanks.
          But, how can I put the custom data in a BaseContainer?
          That is not clear in the documentation.  Can you eventually post a little code?
          Thanks in advance,

          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 09/03/2006 at 15:54, xxxxxxxx wrote:

            Use BaseContainer::SetData() with a GeData() intialized with your custom datatype. For example:

                
                
                bc->SetData(MY_ID, GeData(MY_DATATYPE_ID, data));
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post