Solved How to catch Preferences editing

Hello folks!
I need that my main Command plugin dialog react on some edits in Cinema 4D Preferences.
How it possible to track? Watching with Timer or maybe there is some CoreMessage() trick?
thank you!

Checkout my python tutorials, plugins, scripts, xpresso presets and more
https://mikeudin.net

Hi @mikeudin,

looking at the implementation of the node that is internally attached to the preferences dialog, I have to confirm what the public documentation implicitly states - that there is no message being broadcasted. The next best solution would be probably to cache the preferences yourself and then regularly compare that cache against the live settings via GetWorldContainerInstance and a MessageData with a timer for example.

This of course will come with considerable overhead, but I do not see any other solution right now.

edit: Instead of using a timer, you could also listen for EVMSG_CHANGE in your dialogs CoreMessage, slightly reducing the overhead. This will work because the preferences are a represented as a node and edits will then be reflected by such core message.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hi @mikeudin,

looking at the implementation of the node that is internally attached to the preferences dialog, I have to confirm what the public documentation implicitly states - that there is no message being broadcasted. The next best solution would be probably to cache the preferences yourself and then regularly compare that cache against the live settings via GetWorldContainerInstance and a MessageData with a timer for example.

This of course will come with considerable overhead, but I do not see any other solution right now.

edit: Instead of using a timer, you could also listen for EVMSG_CHANGE in your dialogs CoreMessage, slightly reducing the overhead. This will work because the preferences are a represented as a node and edits will then be reflected by such core message.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net

Hi,

without further feedback, we will consider this thread as solved by Wednesday and flag it accordingly.

Cheers,
Ferdinand

MAXON SDK Specialist
developers.maxon.net