// // Description: // this method is called when the plug-in is unloaded from Maya. It // deregisters all of the services that it was providing. // // Arguments: // obj - a handle to the plug-in object (use MFnPlugin to access it) // MStatus MLL_EXPORT uninitializePlugin ( MObject obj ) { MStatus status; MFnPlugin plugin ( obj ); // Add plug-in feature de-registration here // Export plug-in status = plugin.deregisterFileTranslator ( COLLADAMaya::COLLADA_EXPORTER ); if ( !status ) { status.perror ( "deregisterFileTranslator" ); MGlobal::displayWarning ( MString ( "Unable to unregister OpenCOLLADA exporter: " ) + status ); return status; } // Import plug-in status = plugin.deregisterFileTranslator ( COLLADAMaya::COLLADA_IMPORTER ); if ( !status ) { status.perror ( "deregisterFileTranslator" ); MGlobal::displayWarning ( MString ( "Unable to unregister OpenCOLLADA importer: " ) + status ); return status; } #if MAYA_API_VERSION >= 800 // Disable the shared-reference node options. MGlobal::executeCommand ( "optionVar -iv \"referenceOptionsSharedReference\" 0;" ); MGlobal::executeCommand ( "optionVar -iv \"referenceOptionsShareDisplayLayers\" 0;" ); MGlobal::executeCommand ( "optionVar -iv \"referenceOptionsShareShaders\" 0;" ); #endif // MAYA 8.0 and 8.5 #ifdef _DEBUG // Stop the error logging MGlobal::stopErrorLogging(); #endif return status; }
// Shouldn't be any C functions trying to call us, should there? /*extern "C" */MStatus uninitializePlugin ( MObject obj ) { MStatus status; MFnPlugin plugin (obj); status = plugin.deregisterFileTranslator ("GE2"); if (!status) { status.perror ("deregisterFileTranslator"); return status; } return status; }
MStatus uninitializePlugin (MObject obj) { MFnPlugin plug (obj); plug.deregisterFileTranslator ("Adventure"); return MS::kSuccess; }
//----------------------------------------------------------------------------- // Deregister //----------------------------------------------------------------------------- MStatus CVsMayaMPxFileTranslator::Deregister( MFnPlugin &pluginFn, const MString &name ) { return pluginFn.deregisterFileTranslator( name ); }