Unloading a plug-in

Unloading a plug-in through MEL is simple—you use the unloadPlugin command and supply the plug-in name.

  • A dynamic library plug-in must be unloaded before it is recompiled. Failure to do so causes Maya to crash.
  • Before you can unload a plug-in, you must first remove all references to it from the Maya scene. Along with deleting nodes from the scene that are defined in plug-ins, it is also necessary to flush references to deleted nodes and executed commands from the undo queue. Even though the artifacts are no longer in the scene, they are still there for undo purposes.
  • If you force the unload of a plug-in while it is in use, it will not be possible to reload node plug-ins. This is because existing nodes in the scene will have to be converted to "Unknown" nodes, and on plug-in reload, you will not be allowed to change the type of these existing nodes.
  • The loadPlugin/unloadPlugin commands have been extended to work with scripted plug-ins.