Hi,
Not sure if this topic fits this particular part of the forum. It might be better suited in the "Cinema 4D Development" subforum, but as it handles a more general question, I assumed it would be OK to post it here instead. Open for anyone to discuss.
I'd like to refer to this topic, which was used for reporting a bug in R21. It contains code example of a plugin using a DescriptionToolData
and a GeUserArea
.
The idea was to use a DescriptionToolData
to hover over polygons in the 3D Viewport, and to display an alternative view into a GeUserArea
.
For purpose of reporting the bug I simply provided code to display a flat projection of the object and the hovered over polygon into the GeUserArea
. (didn't come up with simpler code to demonstrate the issue).
Now, in this example I am using global variables to pass on information between DescriptionToolData
and GeUserArea
. This works, but isn't quite elegant.
As such, I was wondering if there was any other way of communicating between 2 plugins (being part of the same binary). I know about sending messages by means of SpecialEventAdd, Message, SendMessage, SendCoreMessage, ... But I am more looking into a "synchronous" solution (if that makes sense).
Additionally, when handling multiple plugins (be it ToolDatas, GeDialogs, CommandDatas, GeUserAreas, etc ...) I haven't found a better way than to use one singleton class which is available as a global variable to all plugins (in that same binary), in order to synchronize and share data between them.
It would be nice to discuss this topic with others (MAXON SDK support people and/or other 3rd party developers in the community).
For now, I am interested in the classic API only, since I am trying to be backwards compatible as far as R16.
But don't let this prevent discussing the new maxon API solutions.
Thanks,
Daniel