// minimum plugin // used Brent's ppt slides to configure and maya help for content // also used Brent's includes and public function declarations // move .mll file to maya/pluging/ when built #include #include #include #include #include class makeSphere : public MPxCommand { public: //creator function static void *creator(); //command execution functions virtual MStatus doIt(const MArgList &args); }; MStatus makeSphere::doIt( const MArgList& args ) { MStatus stat; stat = MGlobal::executeCommand("sphere"); if(stat==MS::kSuccess) setResult("The sphere is alive!"); else displayError("[ERROR] could not create a sphere"); return stat; } void* makeSphere::creator() { return new makeSphere; } MStatus initializePlugin( MObject obj ) { MFnPlugin plugin( obj, "Alias", "1.0", "Any" ); plugin.registerCommand( "makeSphere", makeSphere::creator ); return MS::kSuccess; } MStatus uninitializePlugin( MObject obj ) { MFnPlugin plugin( obj ); plugin.deregisterCommand( "makeSphere" ); return MS::kSuccess; }