DoUndo() & Message()?
-
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 -
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 -
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