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 from c4d import plugins class TimerMessage(plugins.MessageData): def GetTimer(self): return 100 def CoreMessage(self, id, bc): if id == c4d.MSG_TIMER: # Do something return True if __name__ == "__main__": plugins.RegisterMessagePlugin(id=1234567, str="", info=0, dat=TimerMessage())
c4d.plugins.
MessageData
¶
c4d.plugins.BaseData
MessageData.
GetTimer
(
self
)
¶
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: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool |
||||||||||||||||||||||||||||||||||||||||||||||||||||
Returns: |
Currently not used but a bool has to be returned. |