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

    DoUndo() & Message()?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 278 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 06/04/2008 at 08:58, xxxxxxxx wrote:

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

      ---------
      Howdy,

      It seems that if you call a DoUndo(), you can't send a tag a message anymore:

      If I do this:

      > if(doc->DoUndo()) \> { \>      tag->Message(MY_UNDO_MESSAGE); \> }

      and add this in TagData::Message() :

      > case MY_UNDO_MESSAGE: \>      GePrint("Message received - MY_UNDO_MESSAGE"); \>      break;

      It never prints to the console, so the tag never receives the message. If I comment out the "DoUndo()" line, the message is then received, but I need the DoUndo(). :o(

      Is there another way to send the message to the tag?

      Adios,
      Cactus Dan

      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 07/04/2008 at 09:23, xxxxxxxx wrote:

        Are you trying to catch a document undo within your tag?

        cheers,
        Matthias

        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 07/04/2008 at 10:32, xxxxxxxx wrote:

          Howdy,

          Well, actually I have a MessageData that performs an undo on an object before calling a CommandData that performs a function on the object. But there is a tag that works with the command, that needs a flag set in its BaseContainer. I was trying to set that flag by sending a custom message to the tag after the DoUndo() was called. :o(

          There is a check box in the tag's AM that can be turned on and off, so I was trying to determine if the check box was off, and then just turned on, because when the check box is turned on, the "DoUndo()" call in the MessageData turns it back off along with performing the undo on the object. :o(

          But, since then, I've found a better solution. Now the tag polls for the message MSG_DESCRIPTION_CHECKUPDATE and sets the flag then if the checkbox was just turned on, because that comes before the MessageData. Now I just do a check to see if the flag was set, and if so, don't call the DoUndo() this time around from the MessageData, but wait until next time. It seems to work. ;o)

          Adios,
          Cactus Dan

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