本文整理匯總了Python中maya.cmds.unloadPlugin方法的典型用法代碼示例。如果您正苦於以下問題:Python cmds.unloadPlugin方法的具體用法?Python cmds.unloadPlugin怎麽用?Python cmds.unloadPlugin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類maya.cmds
的用法示例。
在下文中一共展示了cmds.unloadPlugin方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: uninstall
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import unloadPlugin [as 別名]
def uninstall():
if ENABLE_UNDO:
# Plug-in may exist in undo queue and
# therefore cannot be unloaded until flushed.
cmds.flushUndo()
# Discard shared module
shared.undo = None
shared.redo = None
shared.undos.clear()
shared.redos.clear()
sys.modules.pop(name, None)
cmds.unloadPlugin(os.path.basename(__file__))
self.installed = False
示例2: load_plugin
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import unloadPlugin [as 別名]
def load_plugin(cls, plugin):
if cmds.pluginInfo(plugin, q=True, l=True):
cmds.unloadPlugin(plugin)
cmds.loadPlugin(plugin, qt=True)
cls.plugins.add(plugin)
示例3: unload_plugins
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import unloadPlugin [as 別名]
def unload_plugins(cls):
for plugin in cls.plugins:
cmds.unloadPlugin(plugin)
cls.plugins = set()
示例4: reloadRush
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import unloadPlugin [as 別名]
def reloadRush():
try:
cmds.unloadPlugin("Rush.py")
cmds.loadPlugin("Rush.py")
except Exception:
print("Failed to reload plugin")
示例5: unload_plugins
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import unloadPlugin [as 別名]
def unload_plugins(cls):
# Unload any plugins that this test case loaded
for plugin in cls.plugins_loaded:
cmds.unloadPlugin(plugin)
cls.plugins_loaded = []