I am trying to load a .mll as a plugin for maya. It compiled without any errors, but when I try to load the plugin in maya, I recieve the following error:
// Error: file: C:/Program Files/Autodesk/Maya2011/scripts/others/pluginWin.mel line 665: initializePlugin function could not be found in plug-in (helloWorld) //
The plugin does have a initializePlugin function:
MStatus initializePlugin(MObject obj)
{
MStatus status;
MFnPlugin plugin(obj, "myName", "1.0");
status = plugin.registerCommand( "helloWorld", helloWorldCmd::creator );
if(status)
{
status.perror("registerCommand - helloWorld");
return status;
}
return status;
}
Any help would be greatly appreciated. Here's the whole plugin:
\#include <maya/MSimple.h>
\#include <maya/MGlobal.h>
class helloWorldCmd: public MPxCommand
{
public: helloWorldCmd();
virtual ~helloWorldCmd(); MStatus doIt(const MArgList&); MStatus redoIt(); MStatus undoIt(); bool isUndoable() const; static void* creator();
};
helloWorldCmd::helloWorldCmd()
{}
helloWorldCmd::~helloWorldCmd()
{}
void* helloWorldCmd::creator()
{ return new helloWorldCmd();}
MStatus helloWorldCmd::doIt( const MArgList& args )
{
MStatus stat = MS::kSuccess;
MGlobal::displayInfo( "Hello World\n" ); return stat;}
MStatus helloWorldCmd::redoIt()
{
return MS::kSuccess;
}
MStatus helloWorldCmd::undoIt()
{
return MS::kSuccess;
}
bool helloWorldCmd::isUndoable() const
{
return false;
}
MStatus initializePlugin(MObject obj)
{
MStatus status;
MFnPlugin plugin(obj, "myName", "1.0");
status = plugin.registerCommand( "helloWorld", helloWorldCmd::creator );
if(status)
{ status.perror("registerCommand - helloWorld");
return status;
}
return status;
}
MStatus uninitializePlugin(MObject obj)
{
MFnPlugin pluginFn( obj );
MStatus stat;
stat = pluginFn.deregisterCommand("helloWorldCmd");
if (!stat)
{
stat.perror("deregisterCommand failed");
return stat;
}
return stat;
}