Is it possible to make a DirectObject accept all the events of the messenger? It would receive the actual event received as a message. This would allow the creation of Messenger proxy/adaptor that resend all the events but using a different self made event system.
This is not possible without modifying Messenger.py. However, it is easy to modify Messenger.py, since it is in fact only Python.
Because don’t want to distribute my own hacked Panda3d version, I thought about modifying the behaviour of the Messenger either:
a) Dirty way: monkey patch the Messenger class to modify the send () behaviour.
b) The OO way: Inherit from Messenger, then overload send () --calling the original send () also. But then the problem is that I need to get the global messenger to be a instance of this (so I can proxy it).
Is there any way get the global ‘messenger’ to be an instance of my modified Messenger or should I just monkey patch the original Messenger class?
I found the answer to the last question bymyself…