Is there a Message ID for Render Data or Render Document Change?
-
Hi!
Is there a way to get a Message ID for Render Document or Render Data change?
I'm using GeDialog so it would work as a listener and every time render data is changed(or Active Render Document is changed) to react on this event.
Thanks for checking in advance,
Thodos. -
I found int ID by printing IDs, but would be nice to know c4d.EVMGS !
-
Hello @Thodos,
thank you for reaching out to us. I would suggest to have a look at our message system manual.
There are no dedicated messages associated with render data changes. If you want to track render data changes in a document, you will have to cache its state. With the help of a
MessageData::CoreMessage
method (or theGeDialog
method of the same name) you can then listen forc4d.EVMSG_CHANGE
and then compare the current state of the render data against your cache. You can of course also use the dirty counters in case that information is enough for you, i.e., when you only want to know that the render data are data container dirty, but do not care what changed in the data container.Document loading and unloading events are conveyed by the node message c4d.MSG_DOCUMENTINFO. Due to being a node message, you will need a
NodeData::Message
method to receive it, i.e., you need to implement some kind of (document bound)[1] node. For anything else, you will have to usec4d.EVMSG_CHANGE
too.Cheers,
Ferdinand[1]
PreferenceData
is technically a node, but it will not be included in theMSG_DOCUMENTINFO
stream. -
Hello @Thodos ,
without further questions or postings, we will consider this topic as solved by Friday, the 11th of august 2023 and flag it accordingly.
Thank you for your understanding,
Maxon SDK Group