On 17/07/2018 at 06:48, xxxxxxxx wrote:
Hi everyone.
Not sure if this is the right branch of forum, but I think that problem is in my python code..
I'm trying to learn C4D CPP API and I've stucked. I can't figure out how to read the data that i sent from python node to my c++ TagData plugin with Message().
My plugin code(part of it) :
MyTestPlugin.cpp
class MyTestPlugin:TagData{
...
...
Bool MyTestPlugin::Message(GeListNode *node, Int32 type, void *data)
{
if (type == 322)
{
GePrint("___Event Fired___");
if (!data)
return false;
GePrint(String::IntToString( (Int32)data ));
GePrint(String::IntToString( *(Int32* )data ));
}
return true;
}
...
...
And my python code(XPresso node) looks like:
import c4d
def main() :
_myCustomTag.Message(322, 112233)
The output:
___Event Fired___
415747088
15
If I'm not mistaken the problem is that python sends message with < Int32> data inside and cpp waits for < Int32*>. But I just can't figure out what to do.(((
Please help.