Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi.
We're developing a live-link plugin for C4D and ran into an issue where we need to register for individual event notifications (through AddEventNotification) per object in order to track the changes we need to sync. For example if I want to track if the material of a certain object has had a texture changed I need to add a notification to the object, keep track of any materials added to the object through that notification and add a separate notification for the material to keep track of the changes there. This is quite convoluted even for this very basic example.
Is there a way to get event notifications for the whole document so we could easily sync over the changes to our application without the need of all the secondary scaffolding?
Thanks, Barna / Ventuz
Hello @BarnaBuzaVentuz,
thank you for reaching out to us. You can listen to broad system wide core messages with for example MessageData::CoreMessage() or GeDialog::CoreMessage(). Broadcasted to these methods will be the EVMSG core messages from the core of Cinema 4D. As for example EVMSG_CHANGE, which will be broadcasted whenever something invokes EventAdd(), i.e., on all changes to the classic API scene graph of a Cinema 4D document.
EVMSG_CHANGE
EventAdd()
There are also SceneHookData plugins which can be used to monitor a scene, as they can be placed in the execution pipeline. There is however no information being broadcasted both in the core message and scene hook case which would tell you which part of the scene has changed, so you must manually search for the changes yourself.
SceneHookData
Cheers, Ferdinand
without any further questions we will consider this topic as solved by Friday, December the 17th.
Thank you for your understanding, Ferdinand