THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/01/2012 at 06:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I'm currently trying to write an effector plugin and started with the dropeffector example. Now, I have problem with adding a button to the effector's description.
The button is declared in the resource files and appears correctly within the GUI. But as soon as I overload Message(), the plugin stops working. It still registers successfully, but InitPoint() and ModifyPoints() aren't called anymore. Also the effector isn't automatically added to a selected MoGraph object on creation anymore (but it's still possible to add it manually, but still InitPoints() and ModifyPoints() aren't called anymore ). ModifyDDescription() keeps working though. Quite obviously, I'm doing something wrong, but I don't find the point...
As soon as I add this Message() function to my plugin, it stops working:
Bool MyTestPlugin::Message(GeListNode *node, LONG type, void *t_data)
{
BaseObject * const obj = static_cast<BaseObject*>(node);
BaseContainer * const bcData = obj->GetDataInstance();
// Button commands
if (type == MSG_DESCRIPTION_COMMAND) {
DescriptionCommand *dc = (DescriptionCommand* )t_data;
if (dc->id == MYTESTPLUGIN_BUTTON_RESET) {
// do something
}
}
return TRUE;
}
Even a completely empty Message() function has the same effect.
Bool MyTestPlugin::Message(GeListNode *node, LONG type, void *t_data)
{
return TRUE;
}
Anybody an idea?
Thanks for your help in advance,
Andreas