nodeMessageCmd/nodeMessageCmd.cpp
         
    
#include <maya/MIOStream.h>
#include <maya/MPxCommand.h>
#include <maya/MFnPlugin.h>
#include <maya/MArgList.h>
#include <maya/MIntArray.h>
#include <maya/MSelectionList.h>
#include <maya/MGlobal.h>
#include <maya/MPlug.h>
#include <maya/MNodeMessage.h>
#include <maya/MCallbackIdArray.h>
             MPlug & otherPlug, 
void* )
 
{
        cout << "Connection made ";
        cout << "Connection broken ";
    } else {
        return;
    }
                cout << 
"  <--  " << otherPlug.
info();
        } else {
                cout << 
"  -->  " << otherPlug.
info();
        }
    }
    cout << endl;
}
{
public:
                    nodeMessageCmd() {};
    virtual         ~nodeMessageCmd(); 
    static void*    creator();
};
nodeMessageCmd::~nodeMessageCmd() {}
void* nodeMessageCmd::creator()
{
    return new nodeMessageCmd();
}
{
    MCallbackId     id;
    
    
    
    for ( 
unsigned int i=0; i<list.
length(); i++ )
 
    {
        
                                                        userCB,
                                                        NULL,
                                                        &stat);
        
        
        
        
        if ( stat ) {
        } else {
            cout << "MNodeMessage.addCallback failed\n";
        }
    }
        
    return stat;
}
{
    return plugin.registerCommand( "nodeMessage", nodeMessageCmd::creator );
}
{
    
    
    for (
unsigned int i=0; i<callbackIds.
length(); i++ ) {
 
    }
    return plugin.deregisterCommand( "nodeMessage" );
}