Go to: Synopsis. Return value. Related. Flags. Python examples.

Synopsis

unloadPlugin( string [string...] , [addCallback=string], [force=boolean], [removeCallback=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

unloadPlugin is undoable, NOT queryable, and NOT editable.

Unload plug-ins from Maya. After the successful execution of this command, plug-in services will no longer be available.

Return value

string[]the internal names of the successfully unloaded plug-ins

Related

loadPlugin, openMayaPref, pluginInfo

Flags

addCallback, force, removeCallback
Long name (short name) Argument types Properties
force(f) boolean create
Unload the plugin even if it is providing services. This is not recommended. If you unload a plug-in that implements a node or data type in the scene, those instances will be converted to unknown nodes or data and the scene will no longer behave properly. It will, however, still save properly.
addCallback(ac) string create
Add a procedure to be called just before a plugin is unloaded. The procedure should have the following signature: global proc procedureName(string $pluginName).
removeCallback(rc) string create
Remove a procedure which was previously added with -addCallback.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Unload the plugin that has the internal name "newNode"
#
cmds.unloadPlugin( 'newNode.py' )