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

    GvNodeMaster Undo

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 438 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 15/10/2017 at 09:43, xxxxxxxx wrote:

      Hello, I would like to ask if it's possible to have a more informations about how undo work inside a GvNodeMaster?

      Should I call GvNodeMaster::GetDocument() ::Start/EndUndo as we do in other context?
      For creating a Node/Port should I use GvNodeMaster::AddUndo() before or after?
      For removing Node/Port should I use GvNodeMaster::AddUndo() before or after?
      For set a node paremeter should I use GvNodeMaster::GetDocument::AddUndo() or GvNodeMaster::AddUndo() ?
      For connect/disconnect should I use document GvNodeMaster::GetDocument::AddUndo() or GvNodeMaster::AddUndo()? Before or After the action?

      Thanks in advance.

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

        On 16/10/2017 at 02:11, xxxxxxxx wrote:

        Hi,

        no, you do not need to call StartUndo()/EndUndo(), in fact this is done internally by GvNodeMaster::AddUndo().
        Additionally GvNodeMaster::AddUndo() is not much more than a AddUndo(UNDOTYPE_CHANGE), so it needs to be called before any changes.

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

          On 16/10/2017 at 02:49, xxxxxxxx wrote:

          Thanks a lot !

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