On 30/03/2017 at 13:09, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 16
Platform: Windows ;
Language(s) : C++ ;
---------
In the python post "Pass data chunks between plugins"
(https://plugincafe.maxon.net/topic/9411/12600_pass-data-chunks-between-plugins)
an object.Message() is used to send data from one plugin to another.
Now I am trying to do the same in c++, but no success.
Plugin 1 is a ToolPlugin that sends info to plugin 2,which is a CommandPlugin.
I get the plugin 2 object and then send a message with an object (BaseObject* object) as data
BasePlugin* mainPlugin = FindPlugin (PLUGIN_2, PLUGINTYPE_COMMAND);
mainPlugin->Message(105645834, object);
Now, in plugin 2, I expect a message coming in for plugin 1.
But nothing.
class C4DO : public CommandData //plugin 2
{
private:
MainDialog dlg;
public:
virtual Bool Execute(BaseDocument* doc);
virtual Bool RestoreLayout(void* secret);
virtual Bool Message(Int32 type, void *data);
};
Bool C4DO::Message(Int32 type, void *data)
{
if (type == 105645834) { //message from plugin 1
GePrint("ok message");
return TRUE;
}
return TRUE; //C4DO::Message(type,data);
}
I also tried Message() and CoreMessage in the dialog part of the commandplugin, but no success.
What am I missing?
-Pim