本文整理汇总了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 = []