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

    Multiple bool undo problem

    Cinema 4D SDK
    c++ r20
    2
    2
    395
    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.
    • rsodreR
      rsodre
      last edited by rsodre

      I'm having a weird problem on my plugin, there's a bool attribute that triggers generation of some geometry, and is not undoing correctly.

      I can enable (see new geometry), Undo (geometry is gone), fine.

      But if I enable (see new geometry) disable (erase geometry) and then Undo, I was expecting to go back to the enabled state, but nothing happens.

      If I enable/disable several times, looks like Undo only works from the enabled to disabled state.

      This was driving me crazy, but then i noticed that if I do something else in between the enable/disable, undo works.

      Then I tried a native C4D node that has bool to test, like the Relief.
      If I set some parameters, click Spherical, and undo, works fine.
      But if I click Spherical several times, I see the same problem that I have on my plugin.
      Undo works just once, and for enabled to disabled.

      Is that expected behaviour?
      Is C4D just ignoring all my undos just because I came back to the previous state, then it just erases the last undo?

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by

        Hi Roger, thanks for reaching out us.

        With regard to the reported behavior, I'm able to reproduce it either with a custom ObjectData and the ordinary Cinema 4D standard tools (like cube generator and the Fillet option).

        But there's more: if the undo operates on a parameter whose values is currently equal to its initializing value, the undo is simply ignored.
        This can be easily tested and verified by initializing the BOOL parameter used in the resource to true in the ObjectData::Init(): as you will see the result is simply the opposite of your reported case.

        To me the behavior is consistent but I will check with the team responsible and see if it can be considered a bug.

        Best, Riccardo

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