// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== global proc unautoLoadPlugin( string $userName, string $plugin) // // Description: // This procedure is called from initialPluginLoad.mel for the purposes of // removing auto-loaded plugins at startup. // // Notes: // By creating this procedure to unload a plugin and set its auto-load to false, // we can invoke it from an "evalDeferred" command in initialPluginLoad.mel. { if (!catchQuiet(`loadPlugin -quiet -name $userName $plugin`)) { if ( `pluginInfo -q -loaded $plugin` ) { pluginInfo -edit -autoload false $plugin; evalDeferred("unloadPlugin "+$plugin); } } }