THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/12/2012 at 20:43, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Mac OSX ;
Language(s) :
---------
Oh what a newbie I am!
I am just trying to learn how to actually process messages coming from my toolPlugin.
Using mostly the c4dsdk source and the SDK docs.
If I understand correctly I use DescriptionToolData for a toolPlugin. Therefore I use this Message function (below). For all I know I should see "ObjectAligner: Message" in the console after clicking a button or other gadget in the dialog. And that is true. From what I understand - and the sample code backs me up - I should also see "MSG_DESCRIPTION_COMMAND" to tell me that my function actually did receive one of those. But I don't and "some other command" is shown.
So, just to make sure:
in
Message (BaseDocument *doc, BaseContainer &data, LONG type, void *t_data)
LONG type is MSG_DESCRIPTION_COMMAND (or another one from the list)
t_data pointing to a descID and its 'id' member contains the actual gadget
Yikes, I am wasting so much time on this. Every time I understand this a little better something like this gets in the way and I can't make sense of it.
Bool ObjectAligner::Message (BaseDocument *doc, BaseContainer &data, LONG type, void *t_data)
{
GePrint("ObjectAligner: Message");
if (type==MSG_DESCRIPTION_COMMAND) {
GePrint("MSG_DESCRIPTION_COMMAND");
} else {
GePrint("some other command");
}
return TRUE;
}