Identify Message Sender
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/07/2010 at 19:18, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Mac OSX ;
Language(s) : C++ ;---------
Hey All,I need to identify the sender of a message.
Scenario:
I have a bunch of custom tags that send a message to a scenehook if they're "dirty" and I need the scenehook to know which tag sent the message. I thought I could do this with a bool on the tags to indicate if they're dirty and search the OM for tags that have this flagged as true... but setting and reseting the bool results in DIRTY_DATA itself, so it doesn't work:(
I'm using a custom message id from a MessageData that I pass from the tag to the scenehook.
I'm hoping that this capability is built into messages or the CoreMessage of the MessageData and I just haven't discovered how to use it;) But if not, I'd be willing to entertain any way you all think this could be accomplished.
The desired end result is that I can then call a function from my scenehook on a specific tag and its object instead of all the tags/objects in the scene (which is a lot of overhead I'd like to avoid).
thanks!
-kvb -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/07/2010 at 05:07, xxxxxxxx wrote:
Have you looked at SpecialEventAdd()? There you could send the tag's pointer as a private data parameter. There is an example in the SDK docu.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/07/2010 at 13:29, xxxxxxxx wrote:
Awesome, thanks again Matthias:)
-kvb