// =========================================================================== // 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. // =========================================================================== proc string getPluginName( string $fileName ) // // Procedure Name: // getPluginName // // Description: // returns the plugin name from the file name: File name up to and excluding the first period. // We can't use pluginInfo to compute the plug-in name, because the plug-in may be unloadable. // // Return Value: // returns the plugin name without the extension. // { string $pluginName = match( "^[^.]*", $fileName ); return $pluginName; } // Returns true if the plugin $fileName is disabled. // The disabled plug-ins' initialization always returns false, and they are // unloadable, so we want to filter them out from the plug-in manager. global proc int isPluginDisabled(string $fileName) { string $disabledPluginsList[]; string $pluginName = getPluginName( $fileName ); if ( stringArrayContains($pluginName, $disabledPluginsList) ) { return 1; } return 0; }