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

    Undo for object handles?

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 377 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

      On 29/08/2017 at 03:01, xxxxxxxx wrote:

      Hi there,

      I implemented some handles for a generator object I'm writing. Moving them changes some values that I store as class members (not as Description values in the BaseContainer).

      It works fine, but moving a handle does not create an Undo step! I thought, calling op.Message(c4d.MSG_CHANGE) or op.Message(c4d.MSG_UPDATE) at the end of SetHandle() would fix it, but it doesn't.

      Any ideas?

      Cheers,
      Frank

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

        On 30/08/2017 at 05:51, xxxxxxxx wrote:

        Hi Frank,

        think of how the Undo system works. It basically creates a copy of the entity.
        So question is: Do you properly handle the member variables in CopyTo()?

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

          On 06/09/2017 at 02:15, xxxxxxxx wrote:

          Yes, of course I do.
          That's what puzzles me.

          The value is copied, but no Undo step is created. If I move a handle and then hit CMD+Z, the change caused by the handle movement stays, but the change I made before that is revoked.

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