This is my code.BUTTON_SET and BUTTON_READ is button. I hope save data in tag just like python,but when i click BUTTON_READ after BUTTON_SET, it just print 0 , the default value.I guess i need to update message.So,what should I do? or just where did I go wrong?
Hope your help!
Bool MyTestTagPlugin::Message(GeListNode *node, Int32 type, void *data)
{
if (type == MSG_DESCRIPTION_COMMAND)
{
DescriptionCommand* dc = (DescriptionCommand*)data;
const Int32 id = dc->_descId[0].id;
switch (id)
{
case BUTTON_SET:
{
BaseTag* tag = (BaseTag*)node;
BaseContainer* bc = tag->GetDataInstance();
bc->SetInt32(ID_MyTestTagPlugin,10);
return true;
break;
}
case BUTTON_READ:
{
BaseTag* tag = (BaseTag*)node
BaseContainer* bc = tag->GetDataInstance();
GePrint(maxon::ToString(bc->GetInt32(ID_MyTestTagPlugin), false));
return true;
break;
}
}
return true
}