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

    ModifyObject and undos

    SDK Help
    0
    1
    155
    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

      On 21/03/2013 at 15:17, xxxxxxxx wrote:

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

      ---------
      I'm having a bit of cognitive dissonance concerning how to handle undos for a particular feature of my plugin in progress.  Basically, here is how it is working (without undos being implemented) :

      My plugin deformer object is childed to object A.  An object, B, that will be used to deform object A is dropped into a linkbox in the deformer plugin.  In a certain mode, the deformation applied to object A by movement of object B can be retained like an imprint by having the deformer object store the changes in a member array.  This can be done any number of times.

      First, because the other objects are being manipulated to obtain these changes, there are no messages sent to my deformer plugin. That rules out messages like MSG_DESCRIPTION_INITUNDO and MSG_DESCRIPTION_USERINTERACTION_END completely for storing undos.

      Second, you can't store undos in GetVirtualObject(), ModifyObject(), or CheckDirty() due to the threading context and possible crash response.

      I know that I can keep another member array to hold the last imprint action.  But how I would utilize it to create an undo for that action before or after the action occurs without messaging or direct access?

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