c4d.plugins.MessageData¶
-
class
c4d.plugins.MessageData¶ - A data class for creating message plugins.Use
RegisterMessagePlugin()to register a message plugin.Here is an example of a message plugin, which
CoreMessage()method is called each 100 ms.import c4d class TimerMessage(c4d.plugins.MessageData): def GetTimer(self): return 100 def CoreMessage(self, id, bc): if id == c4d.MSG_TIMER: # Do something return True if __name__ == "__main__": c4d.plugins.RegisterMessagePlugin(id=1234567, str="", info=0, dat=TimerMessage())
Parent Class:
Overview¶
Override - Called to return a time in milliseconds to receive timer messages (MSG_TIMER) with that interval in
CoreMessage(). |
|
Override - Called to receive core messages. |
Members¶
-
MessageData.GetTimer(self)¶ - Override - Called to return a time in milliseconds to receive timer messages (MSG_TIMER) with that interval in
CoreMessage().This method is queried again after each message.- Return type
int
- Returns
The timer interval in milliseconds, or 0 for no timer messages.
-
MessageData.CoreMessage(self, id, bc)¶ Override - Called to receive core messages.
- Parameters
id (int) – The received core message<MSG_CORE_EVENT>.
bc (c4d.BaseContainer) – The core message container.
- Return type
bool
- Returns
Currently not used but a bool has to be returned.