Load plug-ins into Maya. The parameter(s) to this command are either the names or pathnames of plug-in files. The convention for naming plug-ins is to use a .so extension on Linux, a .mll extension on Windows and .bundle extension on Mac OS X. MAYA_PLUG_IN_PATH will be searched looking for a file with the given name. If you specified the plug-in without an extension, the appropriate one for the platform will be automatically appended. When the plug-in is loaded, the name used in Maya’s internal plug-in registry for the plug-in information will be the file name with the extension removed. For example, if you load the plug-in newNode.mllthe name used in the Maya’s registry will be newNode. This value as well as that value with either a .so, .mllor .bundleextension can be used as valid arguments to either the unloadPlugin or pluginInfo commands.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
addCallback (ac) | callable | ||
Add a MEL or Python callback script to be called after a plug-in is loaded. For MEL, the procedure should have the following signature: global proc procedureName(string $pluginName). For Python, you may specify either a script as a string, or a Python callable object such as a function. If you specify a string, then put the formatting specifier %swhere you want the name of the plug-in to be inserted. If you specify a callable such as a function, then the name of the plug-in will be passed as an argument. |
|||
allPlugins (a) | bool | ||
|
|||
name (n) | unicode | ||
|
|||
qObsolete (q) | bool | ||
quiet (qt) | bool | ||
|
|||
removeCallback (rc) | callable | ||
|
Derived from mel command maya.cmds.loadPlugin
Example:
import pymel.core as pm
# Load the plug-in named "newNode" into Maya.
#
pm.loadPlugin( 'newNode.py' )
# Load all the plug-ins found in all the directories that are
# included in MAYA_PLUG_IN_PATH.
#
pm.loadPlugin( allPlugins=True )