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

    Failing Undo-calls

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 369 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 18/01/2007 at 04:22, xxxxxxxx wrote:

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

      ---------
      Hi all!

      I'm new here and just started looking into the SDK. I have many questions starting with this one.

      I have been playing around alittle with tags, letting them modify the host object. I'd like to be able to undo these changes and therefore i tried this from within Execute(...) of my tag plugin:

        
      doc->StartUndo();  
      doc->AddUndo(UNDO_CHANGE, op)  
        
      // translate or rot or somth.  
        
      op->Message(MSG_UPDATE);  
      doc->EndUndo();  
      

      The thing is that all undo method calls fail.
      What are the criterions for StartUndo and the other fellows to be successful?

      I haven't really gotten the feeling yet, for where and when things are to be done in the C4D SDK and i'd really appreciate some pointers.

      / Jonas

      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 18/01/2007 at 06:34, xxxxxxxx wrote:

        there is no real criterion. It also works here just fine. I have no clue what the problem may be, I have never had this problems within 5 years of plugin development for c4d. 🙂

        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 18/01/2007 at 06:41, xxxxxxxx wrote:

          Well, I think I got it now. Maybe I was trying somthing stupid :-).
          I was trying to let a checkbox in AM trigger StartUndo.
          It fails as long as I hover the AM but succeeds when I click somewhere in the scene.

          Thanks for your answer.

          /Jonas

          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 23/02/2007 at 17:08, xxxxxxxx wrote:

            Howdy

            Hmmm, correct me if I'm wrong but I think if you use StartUndo() within an Execute(), you're actually nesting a StartUndo() within another StartUndo() because there is already one active before it gets to the Execute() function. At that point I think all you have to do is use the AddUndo()

            I've noticed that if you have a StartUndo() within a StartUndo(), you end up having to do 2 undos to get back where you were.

            Adios,
            Cactus Dan

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