MStatus initializePlugin(MObject obj) { MStatus stat = MS::kFailure; MFnPlugin impPlugIn(obj, PLUGIN_COMPANY, "3.0", "Any"); // This is done first, so the strings are available. stat = impPlugIn.registerUIStrings(registerMStringResources, "animImportExportInitStrings"); if (stat != MS::kSuccess) { stat.perror("registerUIStrings"); return stat; } stat = impPlugIn.registerFileTranslator("animImport", "none", animImport::creator, (char *)animImportOptionScript, (char *)animImportDefaultOptions, true); if (stat != MS::kSuccess) { return stat; } MFnPlugin expPlugIn(obj, PLUGIN_COMPANY, "3.0", "Any"); stat = expPlugIn.registerFileTranslator("animExport", "", animExport::creator, (char *)animExportOptionScript, (char *)animExportDefaultOptions, true); return stat; }
MStatus uninitializePlugin(MObject obj) { MStatus stat = MS::kFailure; MFnPlugin impPlugIn(obj); stat = impPlugIn.deregisterFileTranslator("animImport"); if (stat != MS::kSuccess) { return stat; } MFnPlugin expPlugIn(obj); stat = expPlugIn.deregisterFileTranslator("animExport"); return stat; }
MStatus initializePlugin(MObject obj) { MStatus stat = MS::kFailure; MFnPlugin impPlugIn(obj, PLUGIN_COMPANY, "3.0", "Any"); stat = impPlugIn.registerFileTranslator("animImport", "none", animImport::creator, (char *)animImportOptionScript, (char *)animImportDefaultOptions, true); if (stat != MS::kSuccess) { return stat; } MFnPlugin expPlugIn(obj, PLUGIN_COMPANY, "3.0", "Any"); stat = expPlugIn.registerFileTranslator("animExport", "", animExport::creator, (char *)animExportOptionScript, (char *)animExportDefaultOptions, true); return stat; }