PDA

View Full Version : Confusing error (MNodeMessage)


MTuttle
05-26-2011, 11:10 PM
I'm trying to add a callback to my node for when one of it's attributes change but I'm getting this error before I even compile it:
IntelliSense: argument of type "void (multiParentNode::*)(MNodeMessage::AttributeMessage msg, MPlug &plug, MPlug &otherPlug, void *vpClientData)" is incompatible with parameter of type "MNodeMessage::MAttr2PlugFunction"

The line it's referring to is:
MNodeMessage::addAttributeChangedCallback(myNode, AttrChangedCB, NULL, &stat);

Can anyone tell me what's going on?

Edit: Never mind, looks like you aren't supposed to put your callback function inside a class/header or something like that...

sirpalee
05-27-2011, 02:12 PM
You can put them inside a class, as long as they are declared static.

Pal.

CGTalk Moderation
05-27-2011, 02:12 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.